Inner content menu. Highlight current item
-
WordPress has a built in feature that assigns the class “current-menu-item” to the current navigation item.
Nevertheless, that feature only works for contextual menus; and not for the ones inside the post content.
You can see in [ redundant link removed ] that the first level parent item OBRAS is highlighted, but not the third level child GRÁFIKA located left in the inner page menu.
Looking for a method to accomplish this highlight feature in the inner menu.
Thanks
The page I need help with: [log in to see the link]
-
That is a question for the theme developers. How the content is displayed is controlled by the theme https://wordpress.org/support/theme/v12
@jaycbrf the question is not theme related.
Im a using menu shortcode plugin.
Therefore, I am trying to find a WordPress solution.
Thanks
PS: I also asked the plugin developer for support.
Looking for help with a specific theme or plugin? Head to the theme or plugin’s page and find the “View support forum” link to visit the theme or plugin’s individual forum.
I already contacted the theme and plugin support; no answer.
Nevertheless, as I already said, this is not a theme or plugin issue as:
– The menu is created by WordPress.
– The plugin; all it does is generate a shortcut to insert the menu inside the post.While WordPress assigns the current-menu-item class to the Header and Footer menus, it lacks the ability to assign this class to the inner post menu.
Therefore, I believe WordPress could be fixed or improved in this ability.
So sad to lack not only for any support, but not any understanding.
Thanks
- This reply was modified 6 years ago by Dinamicore.
I asked this question based on 2 facts:
– The menu is created by WordPress.
– The plugin; all it does is generate a shortcut to insert the menu inside the post.
So the question is not Theme related, and not plugin related. It´s WordPress related.
Nevertheless, I asked the Theme developer and the Plugin developer, without response.
In addition, no answer from WordPress.Org Forum. All they say is “ask the theme or plugin developer”.
Therefore, once I found a solution, not the ideal one but at least one that will allow the highlight effect without any core modification, I felt I had to post it here:
I used WordPress Add Custom CSS plugin to add css per each page.
Then I added the individual code for each menu:
li#menu-item-981 a { color: #FEBF46 !important; font-weight: bold !important; text-shadow: 1px 0 #FEBF46; }
And that was it; not an ideal automatic solution, but a simple and clean one.
Thanks for your attention.
- This reply was modified 6 years ago by Dinamicore.
Finally, I only added the code to first inner menu item and it worked.
- The topic ‘Inner content menu. Highlight current item’ is closed to new replies.