Display different widgets in different categories

How To Display Different Widgets Based On Product Categories

Using Widget Logic, you can easily set what widget you want to display based on what WooCommerce product categories users are browsing.

For example, you can set what widgets users will see when he will land to Book product category. These widgets will not be visible to other pages, it will be only shown to a user when he lands to that exact category.

Let’s see how we can set a widget which will only be visible to certain WooCommerce product category:

  1. Download and install Widget Logic
  2. Now, Go to Appearance -> Widgets and add the widgets to your sidebar
  3. You’ll find a new “Widget Logic” field added at the bottom of every widget
    widget-logic
  4. Go to Product -> Categories
  5. Select the category and copy what’s written on the Slug field
  6. Since you want to display these widgets only on WooCommerce category pages, write is_product_category() in widget logic field
  7. Paste the category slug, if you want to display widgets only on one category. Like this is_product_category( ‘clothing’ )
    widget-logic-set
  8. Click on Save

Using Widget Logic along with WordPress, WooCommerce Conditional tags. You can set various conditions and dictate when do you want to display your widgets.

Required Plugins:
Additional Resources:

Leave a Reply