[Support request] Add Secondary Navigation only on Shop/Product Pages and a Few Others

Home Forums Support [Support request] Add Secondary Navigation only on Shop/Product Pages and a Few Others

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #611685
    heather

    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

    GP Premium 1.6.2
    #611785
    David
    Staff
    Customer Support

    This CSS will hide it on all pages except Woocommerce

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

    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!

    #611825
    David
    Staff
    Customer Support

    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.

    #612394
    heather

    Awesome! Thanks for this. 🙂

    #612677
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.