Forums Forums Search & Filter Pro Results not displaying until a selection is made

Tagged: 

Viewing 10 posts - 1 through 10 (of 32 total)
  • Anonymous
    #225985

    Hello, I found a post with this same issue in the title (https://support.searchandfilter.com/forums/topic/results-not-displaying-on-home-page-until-a-selection-is-made/), but all the replies are marked as private.
    So, why I am not seeing any results untilI select or deselect something? Regardless of Ajax being activated or not, and regardless being in the home page or archive page.

    Thank you.

    Anonymous
    #225988

    Related to this, does exist an option to have all category checkboxes selected by default?

    Trevor
    #226005

    It is not possible (all checked), as the default, when all are unchecked, is for all to be included in the results.

    As to the other question, are you able to send me a live link/URL to your search page so I can take a look?

    Anonymous
    #226019
    Anonymous
    #226039

    hi! Is it possible have the results empty or not displaying until a selection is made?

    thanks!

    Trevor
    #226041
    Anonymous
    #226099

    Hello, I think that the problem is related to my filter that adds custom post types to the main query.
    I just created a regular post and it shows.

    This is the filter I am using:

    add_filter( ‘pre_get_posts’, ‘wpshout_add_custom_post_types_to_query’ );
    function pmi_add_custom_post_types_to_query( $query ) {
    if(
    (is_home()||is_category()) &&
    $query->is_main_query() &&
    empty( $query->query_vars[‘suppress_filters’] )
    ) {
    $query->set( ‘post_type’, array(
    ‘post’,
    ‘event’,
    ‘story’,
    ‘patent’
    ) );
    }
    }

    Anonymous
    #226101

    What is the right way to modify it?

    Anonymous
    #226103

    Nevermind, I commented the filter and the situation is the same.
    However I guess I would not need the filter anymore thanks to the filter option “Search in the following post types”.

    Trevor
    #226294

    That is correct. If you are making custom changes to the wp_query yourself, depending on how you make them, could be causing issues. When using our filter, it is best to have only a simple query in the theme template.

Viewing 10 posts - 1 through 10 (of 32 total)