The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › WP 4.2.1 update affecting plugin
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
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.
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
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.
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/
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!
Ross,
That is better.
Let’s call this one resolved then.
The topic ‘WP 4.2.1 update affecting plugin’ is closed to new replies.
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy