Forums › Forums › Search & Filter Pro › WP 4.2.1 update affecting plugin
- This topic has 25 replies, 2 voices, and was last updated 9 years, 6 months ago by Ross.
-
Ross Moderator(Private) May 8, 2015 at 1:40 pm #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(Private) May 8, 2015 at 5:12 pm #17049Ross,
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(Private) May 8, 2015 at 5:14 pm #17050Have 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(Private) May 8, 2015 at 5:25 pm #17054I 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(Private) May 8, 2015 at 5:31 pm #17055Ross,
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(Private) May 8, 2015 at 5:40 pm #17059Hi 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 classwoocommerce-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!
-
AuthorPosts