• Hi,

    I’m using WP Custom Fields search plugin on a specific page to search by custom fields. Currently, I have this set up on a specific page to display 2 drop-downs of specific custom field values. you can see this here: https://ncs.lodjixmedia.net/venues/

    The problem I’m having is that when displaying the search results (which works fine for the most part), my sidebar no longer works. Using the regular search has no adverse effects on my sidebar.

    My sidebar code is:

    <div id="content-right">
    
    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=4&paged=$page&posts_per_page=1&orderby=rand");
    while(have_posts()) : the_post(); ?>
    <div id="homebox" class="promo" onclick="location.href='<? echo get('promo_url'); ?>';" style="margin:0 0 15px 0; background:url('<? echo get('promo_image'); ?>') no-repeat scroll 0 0 transparent;">
    
    <div id="promo-title"><h4 class="promo"><?php the_title(); ?></h4></div>
    
    </div><!-- end homebox-->
    <?php endwhile; ?>
    
    <div id="homebox" class="side">
    <h4 class="title">Recent News</h4>
     <ul class="widget">
             <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
             query_posts('cat=3&paged=$page&orderby=date&order=DESC&posts_per_page=4');
             while(have_posts()) : the_post(); ?>
             <li style="margin-bottom:-5px;"><p class="widget" style="margin:10px 0 0 0;"><a href="<?php bloginfo('url'); ?>/news#<?php the_ID(); ?>"><?php the_title(); ?></a></p>
            <p style="margin:0 0 0 0;"><?php the_excerpt(); ?></p></li>
             <?php endwhile; ?>
             </ul>
             <p class="more"><a style="margin:0 5px 15px 0;float:right;" href="<?php bloginfo('url'); ?>/news">show me all</a></p>
             <div class="clear"></div>
    
    </div><!-- end homebox-->
    
    </div><!-- end content-right -->

    For some reason, my queries for the sidebar doesn’t work when using this so I was wondering if anyone could shed light on this… maybe let me know how I can modify my query to work with this or what I’ve done wrong.

    Thanks for all your assistance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Quincy

    (@lodjixmedia)

    Please? Anyone…?

    Thread Starter Quincy

    (@lodjixmedia)

    Ok, I’ll reword my question…

    Can anyone know what would cause my query (in the code posted above) to not work? This works on EVERY other page except when I use this plugin to perform a search. It really doesn’t make sense to me why my query is broken…

    Any suggestions? I just need some direction….

    Thanks everyone =)

    Thread Starter Quincy

    (@lodjixmedia)

    Would my sidebar work if I built the query with SQL instead of “query_posts” or “WP_Query()”?

    Is ANYONE going to help me out here? I refuse to believe this is the one issue that NO ONE on this site can assist with…

    PLEASE?!?!?!? HELP?????????

    Hi,
    Try solution from this one topic, maybe will work (I didn’t test it):
    https://www.ads-software.com/support/topic/get_query_varpaged-returns-nothing

    I have the same problem. I have a custom sidebar that shows the latest posts (recipes) with their thumbnail. Only the search results appear in the sidebar instead of the latest recipes.

    I had this same problem and it was a conflict between this and the plugin I was using to display category posts in the sidebar. Try a different plugin for that (there are a few available) and it should fix this problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Custom Fields Search] Custom fields search results issue.’ is closed to new replies.