[Resolved] Remove navigation from certain pages

Home Forums Support [Resolved] Remove navigation from certain pages

Home Forums Support Remove navigation from certain pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #261043
    Jamal

    Hello good people

    How can i remove main menu from certain pages using php? I have my navigation set to float right and i would like to hide the navigation and instead show breadcrumbs on certain pages using inside_navigation_hook

    #261130
    Tom
    Lead Developer
    Lead Developer

    CSS is the easiest way, but I assume you’re not wanting them.

    The generate_navigation_location filter is what you’re looking for: https://docs.generatepress.com/article/navigation-location/

    #261179
    Jamal

    Perfect ! Much much appreciated.

    My site is one pager and this came in handy as i need to show my navigation only on the front page, the other pages like cpt will show the breadcrumbs because the one pager navigation was serving no purpose on those pages.

    Now that i have removed the navigation on those pages, the sticky navigation is gone as well. Any way to have like a sticky navigation but with my breadcrumbs instead?

    #261289
    Tom
    Lead Developer
    Lead Developer

    You would have to apply position:fixed to the breadcrumb element I believe.

    Which sticky effect are you using?

    #261381
    Jamal

    I have tried with both sticky effects and even none, but it doesn’t show up. Not much of a deal anyway, those pages won’t be very long.

    The breadcrumb is in the before_header_content hook so if need arise i will explore how to make site header sticky.

    Thanks very much !

    #261471
    Tom
    Lead Developer
    Lead Developer

    No problem! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.