Forums › Forums › Search & Filter Pro › Post count for category not accurate
- This topic has 23 replies, 3 voices, and was last updated 9 years, 1 month ago by
Anonymous.
-
Anonymous(Private) February 23, 2017 at 5:15 pm #92499
I have tried disabling plugins 1 by 1 untill all plugins except for searching filter were disabled only to have the same result. I have not tried changing themes. The site is using the theme Salient, which is one of the most popular/commonly used themes from themeforest.com – https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Ross Moderator(Private) February 27, 2017 at 1:49 pm #93137Hi Scott
I’ll be jumping back on this today, sorry for the delay.
I’m aware Salient is popular (and use it myself on a few sites) – S&F *should* be working with Salient, however, we still need to eliminate it as a possible point of error – its just we have to tick a bunch of possibilities off the list – and the first things are plugins & theme.
I’ll be looking at this later this afternoon, if you give me the green light I’ll happily test out another theme on staging.
Best
Ross Moderator(Private) February 27, 2017 at 6:59 pm #93272Yup something not working right with S&F + Salient.
I’ve narrowed it down somewhat, when your search term is less than 3 characters you get strange count numbers.. but when your search term is over 3 characters everything is ok :/
Anyway, trying to track down.
Best
Ross Moderator(Private) February 27, 2017 at 7:55 pm #93301Ok nailed it! 🙂
The issue was some new code (I guess new) in Salient that was affecting our count numbers… it was the
change_wp_search_sizefunction found infunctions.php.In order to resolve, I just made sure it wasn’t applied to S&F queries by adding the modified function to the child theme:
function change_wp_search_size($query) { if ( $query->is_search ) { if(!isset($query->query_vars['search_filter_id'])) { $query->query_vars['posts_per_page'] = 12; } } return $query; }(So you’ll need to add this to your child theme on live)
Hope that helps! I’m looking into a way to fix this permanently within the plugin (and understand why its causing so many issues, it seems like a pretty simple filter to me) but for now you will need to add the code above to any child theme of salient.
Hope that helps
Best
-
AuthorPosts