How to add a .current_page_parent to any link with a function?
-
Hello,
i hope this is the right forum. I’ve been reading a lot of topics about highlighting the parent of a menu but so far my question never seemed resolved.
I made my menu without using the wp_links, i made my navigation list manually.
Now I would like to achieve that if you click on an inline link inside a page to a page on the site that it adds “.current_page_parent” so that you see visually you are still in the same site section.
Ill try to make myself a bit more clear:
Say i have a page:
http://www.site.com/portfolio (i see my navigation “portfolio” highlighted)and on that page there is a list with links to different works,
then i click on one of those links
http://www.site.com/portfolio/work23i would like to see my menu item “portfolio” still being highlighted when i am located on a sub page.
Is there a way to add “.current_page_parent” to links via a function in my functions.php? or is that not he way?
Thanks a lot!
The topic ‘How to add a .current_page_parent to any link with a function?’ is closed to new replies.