Forums › Forums › Search & Filter Pro › Filter not showing results, always throw all post
Tagged: button load more
- This topic has 4 replies, 2 voices, and was last updated 9 years, 2 months ago by
Trevor.
-
Anonymous(Private) January 16, 2017 at 7:19 pm #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:
Trevor(Private) January 17, 2017 at 1:20 pm #83094Hi 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(Private) January 18, 2017 at 2:35 pm #83433Thank 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 advanceTrevor(Private) January 18, 2017 at 2:55 pm #83437IF 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/
-
AuthorPosts