Creating a nav menu

First, be sure your theme supports wp_nav_menu which is goes into a template file – such as header.php – with the template tag function <?php wp_nav_menu( $args ); ?> which also requires a function in functions.php. See http://codex.wordpress.org/Function_Reference/wp_nav_menu That will initiate the WordPress 3 menu system that will appear in Dashboard>>Appearance>>Menus Next, read http://codex.wordpress.org/WordPress_Menu_User_Guide on … Read more

Update body class based on menu

As @CharlesClarkson has already explained, you cannot modify the page output with PHP after the output has been sent to the browser. Your menu certainly runs after body_class since the menu must run inside the <body> tag. The only PHP solution I see would involve editing your theme templates in addition to the code above … Read more

How do you manage large menu hierarchies in WP?

It’s an issue with WP core that hierarchies don’t display in Appearance > Menu > Product Categories tab. In that ticket you can find workarounds: https://core.trac.wordpress.org/ticket/18282 For me worked partially (displayed the hierarchy to the left) this plugin, discussed in the above ticket: https://core.trac.wordpress.org/attachment/ticket/18282/preserve-page-and-taxonomy-hierarchy.php you can download it at the bottom of the page and … Read more

Schedule Page to Menu [duplicate]

I believe that this plugin will do what you want. Jamocreations Auto Submenu https://wordpress.org/plugins/auto-submenu/ Here is also a link to the author’s site, http://jamocreations.com/en/artikelen/auto-submenu , where he discusses why he built the plugin and also two other plugins that also work similarly. The advantage of the Jamocreations Auto Submenu plugin though is that if later … Read more

wp_nav_menu() with multiple Class

I don’t know what your conditions are for each class by the hook you’re looking for is nav_menu_css_class. You can use it to append classes or remove classes from each list-item <li> in the menu. /** * Modify list item classes of wp_nav_menu * – https://codex.wordpress.org/Plugin_API/Filter_Reference/nav_menu_css_class * – https://developer.wordpress.org/reference/hooks/nav_menu_css_class/ * * @param Array $classes || … Read more

How to include a third level with wp_get_nav_menu_items function

Seems that nobody has an answer to this question, so I followed @Zlatev advice and created a custom walker class… Download the plugin from GIT and add it to your theme, add the custom walker below to a include() or directly into your functions. <?php /** * Required plugin * https://github.com/adgsm/multi-level-push-menu */ class Push_Menu_Walker extends … Read more