First things first: this plugin is just fab, and made my day; thnx a ton!
There’s one little thing that needs to be checked. It works great with blog posts and custom post types (like I’m using portfolio items, created with Custom Post Type UI).
However, when using it for static pages, that are shown as menu options, it shows the secondary title in the menu once the page is active. That is: for the active menu item. When the page is not active (visiting another page), the secondary title disappears again.
Screenshot: https://imgur.com/a/46Dzfyk
Guess I can solve it with some css (probably set it to display none, or something), however, would be nice if this can be fixed
BTW
I’m using Astra theme and Elementor Page Builder
Other than that: it’s excellent!!!
Cheers,
Marc
.current_page_item {
background:#efbb20!important;
border-top: 0;
}
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
I can see a sliver of my new color behind the gray, so it would suggest that the gray is not a background? Also, the top border is still intact … I’m not sure what I’m doing wrong. Thanks in advance for any help with this.
]]>Thanks for your cooperation
]]>Thanks!
]]>The problem is when I open page the menu is closed and only first level links are shown. I would like to have the active page (the one that is opened) shown in navigation.
For example, if the default first level sidebar menu looks like this:
menu1
menu2
menu3
and i click and navigate to a subpage3 of menu2, i want to have the menu opened to that subpage3
menu1
menu2
– subpage1
– subpage2
– subpage2
menu3
The code I’m using:
<script type=”text/javascript”>
$(function(){
$(‘#nav-menu’).find(‘ul li ul’).hide();
$(‘#nav-menu’).find(‘li a’).click(function(e){
$(this).parent().children(‘UL’).toggle();
});
});
</script>
Any help would be appreciated. As you can see, I’m pretty new at this and trying to figure it out.
]]>The problem is when I open page the menu is closed and only first level links are shown. I would like to have the active page (the one that is opened) shown in navigation.
For example, if the default first level sidebar menu looks like this:
menu1
menu2
menu3
and i click and navigate to a subpage3 of menu2, i want to have the menu opened to that subpage3
menu1
menu2
– subpage1
– subpage2
– subpage2
menu3
The code I’m using:
<script type="text/javascript">
$(function(){
$('#nav-menu').find('ul li ul').hide();
$('#nav-menu').find('li a').click(function(e){
$(this).parent().children('UL').toggle();
});
});
</script>
Any help would be appreciated. As you can see, I’m pretty new at this and trying to figure it out.
]]>yolkbyte.com/test
I am NOT using the built-in menu. I created a new header.php in my child theme and erased all the code for the menu, navigation, etc. And I put the new custom navigation that I designed. I found a method to highlight the active pages (with no parent) but when it comes to child pages, I can’t find a way to do this dymamically.
I searched the forums and codex for answers but most of the solutions are based on built-in menu, again I’m NOT using menus and I created my own navigation from scratch.
Relatively new to WordPress, so very new to PHP. I’m pretty OK with HTML + CSS.
Any help would be greatly appreciated.
]]>