Forums Forums Search & Filter Pro No search results

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #256724

    Hi there,

    doenloaded the plug in and integrated in wordpress step by step the 2 Shortcodes into the page and set the url. I do have categories and want to show them. The plug in shows me all the categories but when I choose one he says there is no result. Any idea to fix it?

    Best,
    JEns

    Trevor
    #256735
    This reply has been marked as private.
    Anonymous
    #256741
    This reply has been marked as private.
    Trevor
    #256752

    Two things to check. One, are you hosting with WP Engine? If you are, read here:

    https://support.searchandfilter.com/forums/topic/results-not-displaying-3/#post-222308

    Second, the form has a number of settings tab. Open the second from last one (Post Meta). Is there a condition set in there, where the last box is empty? user sometimes accidentally add an empty condition, and that would also cause the No Results message. If there is, click Remove.

    Anonymous
    #256774

    Hi Trevor,
    Yes second option there was something inside, so good, solved. Now just a quick question. Without doing no search inquiry, it tells me: “Found 608 Results Page 1 of 68”. How can I delete that, because I did not had an inquiry to filter something. Man thanks.

    Jens

    Anonymous
    #256868

    Any update on this please?

    I want to show the filter but not that you shows directly the results, just after pushing the search button.

    Thanks
    Jens

    Trevor
    #256885

    I apologise for the delay Jens, I ran out of time yesterday.

    If you haven’t already done so, can you follow this guide:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    In particular, follow the instructions in the Customising section.

    That will give you a results.php file you can edit, in a sub-folder named search-filter in your theme folder.

    Would you want to show that after you search? My guess is yes. So, look for this code in the results.php template file:

    Found <?php echo $query->found_posts; ?> Results<br />
    Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />

    And change that to (I think this will work):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(30408)->current_query();
    if (!((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()==""))) {
    	Found <?php echo $query->found_posts; ?> Results<br />
    	Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
    }

    You can change anything else you want also. For example, to make the pagination look nicer, install the free WP-PageNavi plugin and delete these lines:

    <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
    <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
    
Viewing 7 posts - 1 through 7 (of 7 total)