I have a navbar that I only want to appear on the product category page on my woocommerce site. Does anybody know what php or javascript code I need to make this happen? Thanks in advance!
HTML of the navbar (currently in the index.php file)
<nav class="navbar navbar-inverse" data-spy="affix" data-offset-top="91" id="search-nav"></nav>
Note: I’m using WordPress, Woocommerce and Twitter Bootstrap
2
Answers
You could make a custom header with your navbar and then call it on the category-page template like this:
WooCommerce provides the
is_product_category()
conditional to check if the user is viewing a product category archive page: