Site logo

Archived topic

Add Secondary Navigation only on Shop/Product Pages and a Few Others

5 replies · Started by heather on June 29, 2018

Viewing posts 1–6 of 6

Hi,
I LOVE that you guys have secondary navigation and I've got it working, but I don't want to use it site-wide. It's only for one section of my site which includes the shop and a few other pages. How can I get secondary navigation to show up only on those pages and not site wide? I have basic CSS knowledge but I'm a novice.
Thanks & hope you can help! LOVE the theme!!!
Heather

This CSS will hide it on all pages except Woocommerce

body:not(.woocommerce) #secondary-navigation {
	display: none;
}

Hi David, many thanks. Is there a way to add it back on a few select pages that aren't woocommerce as well? My section has the shop and like four other pages.

Thanks!

You can target the specific page id's. Like so:

.page-id-2 #secondary-navigation, .page-id-3 #secondary-navigation  {
    display: block;
}

Just comma separate each of the selectors to add more.
You can get the Page id number# by checking the URL when editing the page.

Awesome! Thanks for this. :-)

You're welcome!

This archived topic is closed to new replies.