Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9131

    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.

    #63577

    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 :)

    #63578

    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!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘WooCommerce conditional tags’ is closed to new replies.