admin管理员组文章数量:1201992
I've recently added a plugin to have product filters (BeRocket) on my wordpress/woocommerce website. To display those filters on the page I made a widget and added it in my woocommerce.php page.
It's pretty much working as intended so far but it also displays the filters on the product pages since they're also generated from woocommerce.php..
Is there a way around that ? I just want those filters on the shop/category/tag pages, can I affect them directly without affecting the product pages ?
Any help appreciated. Best regards.
I've recently added a plugin to have product filters (BeRocket) on my wordpress/woocommerce website. To display those filters on the page I made a widget and added it in my woocommerce.php page.
It's pretty much working as intended so far but it also displays the filters on the product pages since they're also generated from woocommerce.php..
Is there a way around that ? I just want those filters on the shop/category/tag pages, can I affect them directly without affecting the product pages ?
Any help appreciated. Best regards.
Share Improve this question asked Mar 28, 2022 at 8:02 FLOFLO 12 Answers
Reset to default 0You need to use conditional tags of WooCommerce. Please have a look. In your case you can use this
if(!is_product()){
//BeRocket Code
}
they have shortcodes that you place in the relevant archive templates that you want them to appear in.
this would need to be done in your child theme
get_shortcode('[ berocket_shortcode ]');
本文标签: pluginsHow to makes changes on the shopcategorytag pages but not on the product pages in woocommerce
版权声明:本文标题:plugins - How to makes changes on the shopcategorytag pages but not on the product pages in woocommerce? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738644301a2104493.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论