Sidebar not showing on product tag pages

Issue: The sidebar and by extension the sidebar widgets are not showing on your product tag page on your woocommerce site.

Solution: While investigating this issue I have come accross many suggestion to use the widget-logic plugin to solve this issue. Chances are that it won’t help as some code is preventing your sidebar to show on the product_tag page.

Check your page.php template. It might have condition checking if the page is a woocomerce category page or the shop page for better control .

Check if your template has a woocommerce.php file, if it doesn’t look for the page.php file.

Check for a condition such as

if (is_product_category()||is_shop() )

Check that this control the display of the sidebar for example you might see:

get_sidebar()

If you find that the condition checking the page type call the sidebar, bingo, just add an extra condition so that the same code apply to your product-tag pages:

is_product_tag()

If you need to adapt the display for certain tag only you can use:

is_product_tag('tag_name')

To summarize in case you have condition controlling the call to the sidebar make sure to add the is_product_tag() function. In our example it would look like this:

 if (is_product_category()||is_shop() ||  is_product_tag()  )