Hi,
I am using Abunadnce theme and Widget Logic plugin to get a widget to appear only in several pages. But the problem is that I want a widget to appear on a WooCommerce product category page and in all the products of this category, and there are no default Wordpress conditional tags for this. The conditional tags for WooCommerce are http://www.woothemes.com/woocommerce-codex/extending-woocommerce/woocommerce-conditionals/ but I don“t know how to use them properly. Could anyone help me with this?
Thanks in advance.
WooCommerce conditional tags
3 posts from 2 voices-
Posted 1 year ago #
-
Hey,
I'd use: http://codex.wordpress.org/Function_Reference/is_tax - use the code like:
is_tax( 'product_cat', 'Cars' )The widget will be displayed when the user views the "Cars" product category. Obviously you can use any other category :)
Posted 1 year ago # -
Thanks for your help, now it does show the plugin in the specific product category archive page, but I also want it to appear when viewing the subcategories within that product category and the products in them. Is there any way to do that? Thanks!
Posted 1 year ago #
Reply
You must log in to post.














