Community Forums › Forums › Archived Forums › Design Tips and Tricks › Split menu in Genesis
Tagged: menu, Outreach Pro, top level
- This topic has 4 replies, 3 voices, and was last updated 9 years, 9 months ago by ellegaarddk.
-
AuthorPosts
-
June 19, 2014 at 2:21 am #110521ellegaarddkMember
Due to customer demand I need to have two menus:
- Main menu with top level pages in the header
- Submenu i sidebare with the current page, siblings and child pages.At the moment I have a menu with top level pages defined, and another with all the structure of the site - as I can easily find a plugin, with a widget that can handle that part.
But it's a mess to keep current. What I would like to do, was to either just have one menu with alle the structure and then only show the top level in the header.
How do I do that without breaking the theme?
I've already established a plugin with my own modifications, as I don't like to make too many changes to the theme files unless aboslutely necessary.
Morten Ellegaard Larsen – Designer and solution finder, ellegaard ID | Noerresundby, Denmark
“I ain’t no expert, I just know more…”
June 19, 2014 at 6:19 am #110542Jami Howard MaysMemberSounds like you are looking for a menu that displays content conditionally.
Googling brought me this link: https://wordpress.org/plugins/if-menu/
Looks like it'll work just like widget logic, but in a menu. So you'd create your big menu that would contain all the page info and then you'd set each item to have conditions.
Jami Howard Mays, HBIC, Imaj Works | Athens, Georgia
June 19, 2014 at 6:28 am #110546ellegaarddkMemberWhile it might solve this problem, it's not an elegant solution.
I will have to make the change for each menu item, which introduces another place to make an error. And the customer will have to remember this option when adding new top level items to the menu.
So thank you, but no thank you. 🙂
I just need a way to make the menu in the top show ONLY top level items. And hiding the rest isn't an option here, as there's some SEO considerations involved as well...
Morten Ellegaard Larsen – Designer and solution finder, ellegaard ID | Noerresundby, Denmark
“I ain’t no expert, I just know more…”
June 19, 2014 at 7:17 am #110554Lauren @ OnceCoupledMemberI did this recently using Christian Varga's tutorial: http://christianvarga.com/how-to-get-submenu-items-from-a-wordpress-menu-based-on-parent-or-sibling/
This can be hooked into your Genesis theme using:
remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' ); add_action( 'genesis_sidebar_alt', 'hook_custom_sidebar' ); function hook_custom_sidebar() { wp_nav_menu( array( 'theme_location' => 'primary', 'sub_menu' => true, ) ); }
Best,
Lauren
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
June 19, 2014 at 7:22 am #110555ellegaarddkMemberThanks, Lauren!
This looks very promising, much more in my line of thought.
I'll get back to you, wether or not it works in my setup.
Morten Ellegaard Larsen – Designer and solution finder, ellegaard ID | Noerresundby, Denmark
“I ain’t no expert, I just know more…”
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.