Menu->Submenus
-
It appears that once you add sub menu items to a main page, the main page isn’t accessible anymore as it serves the purpose to expand the sub menu items. This is something I don’t like to have as the main page would require to have information regarding the submenu items.
Is there any way to only expand the sub menu items when clicked upon the “Down Arrow” next to the main page item?
Thanks for further info in advance.
-
To start, you might want to check this out:
https://www.shapedpixels.com/setup-seasonal/an-introduction-to-the-seasonal-menu
To keep the main link as an active link, it cannot have a submenu on it. Unfortunately, linking the arrow only is not possible with this setup. You will need to create a separate menu link for your main page, then a fake link using this symbol # as the URL link (to be the toggle link) to have submenu items on.
Dear Shaped Pixel,
Thanks for the information, I hoped that there was an easier way to get around this but after looking through the code it was obvious this was not the case. Therefore I’ve added a workaround for this which replaces the :after arrow down with an actual DOM element that can be clicked via JS and then also removing the preventDefault so the main link is actual clickable.
$navMenu.find('.menu-item-has-children > a').after('<i class="fa fa-angle-down hchildren" aria-hidden="true"></i>'); $navMenu.find('.hchildren').on( 'click', function(e) {...});I guess this will do for now, I might need to look into the css a bit more regarding how to properly set the current link color for the menu as now when the main page is clicked all of the sub pages have the same current color.
Either way thanks for the fast response!
On a sidenote I find the option to make the sidebar smaller or larger a very nice addition, however it is a shame that the mediaqueries are not relative to this size, making it so that if you have a smaller than the default size (let’s take 25 for example), the menu items/title gets overlapped by the main body if the viewport is smaller than 1360px and then only activates the media queries at a default size of 922px. Which in general of course is editable but it would be a great addition to see that this size of the sidebar is relative to the media query activation.
Either it’s quite a lovely theme you made, keep up the good work!
-
This reply was modified 9 years, 7 months ago by
RafaelDeJongh.
Hey….cool. I will have to try this on my local test site.
I also appreciate any feedback from users because that is what helps make the themes even better.But just to confirm things…everything is OK right now for you?
Yep everything is fine now, thanks for the support!
Website in question: http://healingworkz.nl/
Adding the following CSS code on line 100 to the inlinestyle.php in the inc folder, made the hover for current link also function properly:
.site-navigation li.current_page_item > a:first-of-type, .primary-navigation li.current-menu-item > a:first-of-type, .current_page_parent, .current-menu-ancestor.current-menu-parent.current_page_parent.current_page_ancestor > a,-
This reply was modified 9 years, 7 months ago by
RafaelDeJongh.
I wanted to follow up with you on what you did for the DOM element and would like to add this to the theme (giving you a credit line for that of course).
Is there a name and a link that I can use for the credit?
Oh that sounds pretty sweet! And yea feel free to do so:
Rafaël De Jongh – http://www.rafaeldejongh.com
Would be sufficient! Thanks a bunch 🙂
Thanks in advance for doing so, and I’m glad I could be of assistance 🙂
-
This reply was modified 9 years, 7 months ago by
RafaelDeJongh.
-
This reply was modified 9 years, 7 months ago by
RafaelDeJongh.
-
This reply was modified 9 years, 7 months ago by
The topic ‘Menu->Submenus’ is closed to new replies.
