Forums › Forums › Search & Filter Pro › Customize posts given to archive loop
- This topic has 5 replies, 2 voices, and was last updated 7 years, 5 months ago by Trevor.
-
Anonymous(Private) June 11, 2017 at 10:21 am #114312
Hello :)!
I modified the main query for the posts of the custom post type archive with the filter ‘pre_get_posts’ changing the ‘post__in’ array of the query. The filtering is working, but the count number isn’t correct.
Maybe it’s because of the search&filter cache? Can you tell me how to modify the posts delivered to the search form so that the count is working? It seems that setting my own posts in “$query_args[‘post__in’]” within a “sf_edit_query_args”-filter is not working. What do I wrong?
And when V3 is coming?
Thank you!
Trevor(Private) June 14, 2017 at 11:30 am #114930I think I can see what you are doing. You have your own location filter using lat and lng but want to apply these to our filter. Ideally, you would want our plugin to have geo search, but that is not (yet) a feature. Also, it is not possible (yet) to add your own fields to our search form.
As you have already guessed or read, both features are part of our plans for V3, which is still some months away.
At this time, you have available only the actions and filters shown here:
https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/
Trevor(Private) June 15, 2017 at 11:19 am #115150This is where the post count comes from:
https://codex.wordpress.org/Plugin_API/Filter_Reference/found_posts
-
AuthorPosts