Forums Forums Search & Filter Pro Post count for category not accurate

Viewing 10 posts - 11 through 20 (of 24 total)
  • Ross Moderator
    #92489
    This reply has been marked as private.
    Anonymous
    #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
    #93137

    Hi 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

    Anonymous
    #93235
    This reply has been marked as private.
    Ross Moderator
    #93272

    Yup 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
    #93301

    Ok 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_size function found in functions.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

    Anonymous
    #93511
    This reply has been marked as private.
    Ross Moderator
    #93534
    This reply has been marked as private.
    Ross Moderator
    #93536
    This reply has been marked as private.
    Anonymous
    #93539
    This reply has been marked as private.
Viewing 10 posts - 11 through 20 (of 24 total)