Community Forums › Forums › StudioPress Themes › Infinity Pro › How to create a submeny underneath the main menu?
Tagged: menu, nav menu, secondary menu, submenu
- This topic has 9 replies, 2 voices, and was last updated 3 years, 9 months ago by
Brad Dalton.
-
AuthorPosts
-
April 10, 2022 at 10:38 am #505005
Klubbofg
ParticipantHi, I am trying to achieve this:
So when I click on a menu item that has children, I want those children to show underneath the main menu, like a sub menu.
Right now, the theme is just using the rollover effect. I've tried checking the theme customizations but I can't find anything related to the thing I want to achieve. I have also checked how the code is generated and I can see that the sub menu "ul" is located inside the main "ul". Everything would be solved if I could somehow move the sub menu "ul" to be located underneath the main "ul". See link: https://imgur.com/iIdQo1O
https://niki.a.vaia.cloud/spela-golf/April 24, 2022 at 10:27 pm #505101Brad Dalton
ParticipantWhat theme are you using?
1. You could add a new widget area under the primary nav menu and populate it with the nav menu widget.
2. Or add a third a menu
3. Or reposition the secondary menu by changing the hook.
April 26, 2022 at 8:44 am #505110Klubbofg
ParticipantThe third alternative sounds like the best solution. Do you have some hints on how to do it? Do I have to change something in the nav file? I'm very novice when it comes to hooks and stuff to WordPress. I'm using Infinity via Genesis btw.
April 26, 2022 at 8:55 am #505111Brad Dalton
ParticipantMy suggestion would be to look at using blocks or a full site editing theme if your coding knowledge is limited.
Or
You can reposition the footer menu back to the after header hook position ( remove PHP code line 152 in functions.php ) however you'll also need to add/modify CSS.
April 26, 2022 at 8:57 am #505112Klubbofg
ParticipantThanks for the quick answer! I'm gonna try and figure it out!
April 26, 2022 at 9:14 am #505113Klubbofg
ParticipantOkay, the problem with using the footer menu is that it's constant on all pages. How can I fix it so when I arrive on the page Golf, it shows all Golf's children. And when I go to the page About Us it shows its children and so on?
April 26, 2022 at 9:58 am #505114Brad Dalton
ParticipantYou can use conditional menus
To do this :
1. You can use custom code
or
2. Choose from a range of plugins for conditional menus.
or
3. A conditional blocks plugin.
April 26, 2022 at 12:30 pm #505115Klubbofg
ParticipantThanks! Gonna check it out. Now that you mention it, I was actually reading about conditional menus before, so thanks for reminding me 😀
April 26, 2022 at 2:15 pm #505118Klubbofg
ParticipantAfter fiddling around with the functions.php I got it to work, but the problem was that one menu was always showing and it was too complicated to get it to work on every sub-page, so I left it and my solution was using conditional menu plugin. Thank you again!
April 26, 2022 at 10:48 pm #505119Brad Dalton
Participant -
AuthorPosts
- You must be logged in to reply to this topic.