Forums Forums Search & Filter Pro WP 4.2.1 update affecting plugin

Viewing 10 posts - 11 through 20 (of 26 total)
  • Ross Moderator
    #17032

    Hey Paul,

    Typically with Woocommerce – the best template to use is product-archive.php – try to make sure there is a copy in your child theme (just in case) – if its not in your theme, you should be able to copy it out of the WooCommerce templates folder,

    Bit busy atm but I’ll try to poke around again later on.

    Thanks

    Anonymous
    #17049

    Ross,

    I have used that template (now in the child theme folder) and it’s called archive-product.php btw. That is the one currently seen in the test_page (very like the same results from woocommerce.php) but there is still something I am missing. I am getting a list rather than the grid.

    Ross Moderator
    #17050

    Have you tried, under the “advanced” tab setting “is_search” to true?

    If this doesn’t work, be sure to disable it again after.

    If the above doesn’t work, then it sounds like something in your theme has updated, and it might require some tweaking of the template file to get it working, but we can move on that after you’ve tried the above.

    Thanks

    Anonymous
    #17054

    I hadn’t set that but just did and it made no difference.

    I am seeing the correct results but formatted badly. And that is possibly because I have totally screwed up the results container setting. It used to have #content but that doesn’t seem to work now.

    Also if results require more than one page the pagination links are not working.

    Anonymous
    #17055

    Ross,

    The test page (http://door2doortyres.co.uk/test_page/) and the home page “Ultra Quick Search” are now both set up the same way – archive, using archive-product.php, same settings.

    But I am aiming to get a format of results like the shop page – http://door2doortyres.co.uk/warehouse/

    Ross Moderator
    #17059

    Hi Paul

    I’ve had a quick look… the problem seems to be the wrong CSS is being applied to the search results page.

    As I mentioned before ,these customisations are normally out of scope of support, but I think I’ve cracked it anyway.

    Essentially, on your shop page, the body tag has the following class woocommerce-page (amongst others).

    When I add these in firebug to the search results page, the results look like a grid – not sure if its exactly the same, but very similar…

    So what you need to do is add some wordpress code to add these two classes to your body tags, on search result pages (take from: https://support.searchandfilter.com/forums/search/woocommerce-page/):

    add_filter('body_class','add_body_class_to_search_filter');
    function add_body_class_to_search_filter($classes) {
    	
    	global $sf_form_data;
    	
    	if ($sf_form_data->is_valid_form())
    	{		
    		$classes[] = "woocommerce-page";
    	}
    	// return the $classes array
    	return $classes;
    }

    You can add this to the functions.php of your theme.

    Hope that helps!

    Anonymous
    #17063

    Ross,

    That is better.

    Let’s call this one resolved then.

    Ross Moderator
    #17171

    🙂

    Anonymous
    #17177
    This reply has been marked as private.
    Ross Moderator
    #17185
    This reply has been marked as private.
Viewing 10 posts - 11 through 20 (of 26 total)