Site logo

Archived topic

Anchor-based sticky menu (w. highlight of item in viewport) on sub-pages

3 replies · Started by TheSalvadorDaliOfWebsites on April 18, 2021

Viewing posts 1–4 of 4

Dear GP team,

I can't quite wrap my head around this so I hope you can point me in the right direction.

My website started as a simple one-page scrolling website with sticky menu with highlighting of the section currently in the viewport, based on anchor links to the same page, eg. #topsection

behandlernet.com

Since I started adding some sub-pages and blogposts the top sticky menu (of course) doesn't work on the subpages, the anchor links not containing the full URL. First thing I tried was to add the full URL to the menu points, eg. behandlernet.com/#topsection

A sub-page on the same site

This works but it screws up the highlighting of active section in viewport on the main page. Everything is highlighted all the time, obviously, cause you're allways on the entire page. Makes sense. For now I reverted to using relative anchor links without the full URL.

How can I get both active menu highlighting on the mainpage and make the sticky menu work on subpages as well?

I am using the 'Page scroll to ID'-plugin and GP Premium but reading several threads on this forum has given me the impression it is possible now with GeneratePress alone to create a sticky menu with active section highlighting in the menu. Am I right?

A big fan of your product and recommend often to others.

Man, this is customer service way beyond the beyond, diving into plugin documentation. Thank you.

Glad to be of help!

This archived topic is closed to new replies.