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.
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 :)
The topic ‘WooCommerce conditional tags’ is closed to new replies.