Hello
Drop me exact link to the issue
Where did you insert this code?
Thread Starter
Matt
(@visibledeals)
Hi mediawebster,
here is the link to the issue site.
https://www.staging2.visibledeals.com/product-category/male-enhancement/
I inserted the code in the child theme function.php file.
thanks
Hello
Please drop me a screenshot of the code
Thread Starter
Matt
(@visibledeals)
Thread Starter
Matt
(@visibledeals)
Hi
If I insert only the second code snippet it works. So I’m curious to know what is the first code for?
This one?
if (is_front_page()) { add_filter('woof_get_request_data', 'my_woof_get_request_data'); } function my_woof_get_request_data($request) { $request['product_cat'] = 'music'; //$request['product_cat']='music,posters'; return $request; }
Thanks for your help
Thread Starter
Matt
(@visibledeals)
Hi
one more thing. is it possible to hide the “clear all/ in stock” from the website?
https://snipboard.io/20wEyC.jpg
thanks
Hello
So I’m curious to know what is the first code for? – as described in the article – https://share.stackovergo.com/image/i20211025172040.png – it is filtering by category Music
You can in file – wp-content\plugins\woocommerce-products-filter\js\front.js – add code – https://c2n.me/4dLLsnf.png
if (index == 'stock') {
return;
}
Thread Starter
Matt
(@visibledeals)
woo hoo. That worked perfectly. Thanks
Thread Starter
Matt
(@visibledeals)
Hi mediawebster,
with the recent update i lost my changes to the plugin that you recommended above. Instead of having to manually go in and add the below code every time after updating the plugin. can you make it part of the plugin where users can checkmark if they would like the show filter or not?
if (index == 'stock') {
return;
}
Thanks for creating this plugin. I appreciate it.
Hello
Of course this custom code will be removed with every update.
I will pass your idea to the developers