Forums Forums Search & Filter Pro Filter not showing results, always throw all post

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #82809

    Hi, i’m implementing the filter, but it always shows me all the results, I’m using the wordpress loop, do I have to set something up in the code to work?

    url: http://web.bbdodigital.cl/clientes/chiletravel/experiencias/

    my loop code:

     $args = array( 'category__in' => array(get_cat_ID('bucklist'),get_cat_ID('relatos')), 'posts_per_page' => 10, 'order' => 'DESC','paged'=>$paged );
            $my_query = new WP_Query( $args );
             ?>
               <?php if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post(); 
               if(has_post_thumbnail()) {
                      $theimage = wp_get_attachment_image_src( get_post_thumbnail_id ( $post->ID ), 'big' );
                }....

    My config:
    config admin

    Anonymous
    #82871

    After investigating, I added the ‘search_filter_id’ parameter in the query, the problem is that I can not filter with multiple categories, only filter and one category.

    Trevor
    #83094

    Hi Karl

    If you have multiple parent/child relationships in categories, it might be better to have separate custom taxonomies for these. This post tries to explain this a bit better (you can use a plugin to switch category terms from category to any new taxonomy that you make, so it is not so hard to do). It is a really awful preachy lecture I wrote ? :

    https://support.searchandfilter.com/forums/topic/multiple-categories-combination/#post-55166

    Sorry about the tone, but the message is right and it links to good plugins (except taxonomy switcher I think). If I missed anything (I probably did, my apologies), follow up and nudge me.

    At this time, Search & Filter Pro does not support using any one field source more than once (so you can use Category only once in the form).

    Anonymous
    #83433

    Thank you trevor, finally i have to filter my post via post meta, and all work like a charm.
    I have one last question, there is some javascript method to load more results? searching in the search-filter-build.js and i found self.loadMoreResults(); on window scroll, there is any way to trigger that function from my js ?
    I want a button to trigger the load function.
    Thanks in advance

    Trevor
    #83437

    IF you have v2.3.0 (it is a new feature), the documentation is here for Infinite Scroll:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/infinite-scroll/

Viewing 5 posts - 1 through 5 (of 5 total)