Show number of articles in menu

I think it would be useful to create a custom walker for your menu. In the following code example I made use of the Menu Item Object. You can take a look at the object output here. An object type is specified for every menu item. So I just compare if the object is a … Read more

add taxonomy as one of menu items

Finally I was able to find a way to do exactly what I wanted. Though adding Custom Taxonomy or Custom Post Type can easily be added, while having its Template file, as following: Appearance> Menus > selecting Links widget > putting link of custom post type or taxonomy http://yourdomain.com/your-custom-post-or-taxonomy But also this answer help you … Read more

echo same menu items across multi-site platform

Sorry this should be a comment –> you should be able to use a switch to blog http://codex.wordpress.org/Function_Reference/switch_to_blog This will allow you to grab the main blog ID, from there you can use a WP list pages or a http://codex.wordpress.org/Function_Reference/wp_nav_menu to display the menu of your main site on the other blogs within the network

How to translate menu items?

You can create a menu use another language. Then you use conditional code to switch the menu. or you can use title attribute of menu. if($language==’us’): wp_nav_menu(menu1); else: wp_nav_menu(menu2); endif;

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

Remove current class from sub menu items

Use following code as jQuery: jQuery(‘#nav li’).removeClass(‘current’); jQuery(‘#nav>li.current-menu-item’).addClass(‘current’); jQuery(‘.has-children li.current-menu-item’).closest(‘.has-children’).addClass(‘current’); See jsfiddle (current item red color). When you click “Single Blog” menu item your html structure will like my following example and jQuery will remove class active from it and add class it’s parent exactly like what you wanted. https://jsfiddle.net/dom8188s/

Filter for Admin Nav Menus Drop Down

I believe the filter you want is wp_get_nav_menus: function wp_get_nav_menus( $args = array() ) { $defaults = array( ‘hide_empty’ => false, ‘orderby’ => ‘name’ ); $args = wp_parse_args( $args, $defaults ); /** * Filter the navigation menu objects being returned. * * @since 3.0.0 * * @see get_terms() * * @param array $menus An array … Read more