WordPress always display the first menu

You are mismatching argument and input. In rather confusingly worded way register_nav_menus() creates menu locations rather than actual menus. While menu argument in wp_nav_menu() expects menu as created in admin. Since you seem to want to display menu, assigned to specific location, change menu in arguments to theme_location.

Remove submenu item from list

Use the API functions remove_menu_page and remove_submenu_page to remove menu items rather than manipulating global variables. This will remove the themes page under appearance: function wpa_remove_themes_submenu() { remove_submenu_page( ‘themes.php’, ‘themes.php’ ); } add_action( ‘admin_menu’, ‘wpa_remove_themes_submenu’, 999 );

Expected snippet value not showing

You will not be able to create this kind of markup simply using wp_nav_menu function . Either change your markup or use the Custom Walker Function that will allow you to create anykind of markup.

Switching to child theme breaks menu names

The custom menus assigned to Menu Locations (in the Appearance, Menus, Manage Locations tab) are saved per theme. So when you switched to your new theme, you lost that assignment. Go to the Manage Locations tab and select your custom menus again.

“Widgets” menu doesn’t appear

Another difference between those servers which was actually the problem was that the live server where the issue occurred had been installed via fantastico. After manually reinstalling it, everything was fine.

wp_nav_menu does not take arguments?

The items_wrap argument is in fact a sprintf-ed argument. When you look into Core source: ‘items_wrap’ => ‘<ul id=”%1$s” class=”%2$s”>%3$s</ul>’ …you see that you have to use the arguments to let core do its work. sprintf( $args->items_wrap, esc_attr( $wrap_id ), esc_attr( $wrap_class ), $items ); Here’re the %-arguments: %1$s -> $wrap_id %2$s -> $wrap_class %3$s … Read more

Modify the output of wp_nav_menu in a very specific way?

Take a look here for #1: remove li class & id for menu items and pages list Regarding items #2 and #3, why not just do this with CSS? The separators shouldn’t be in their own <li> tags anyway. The following CSS will add a | after each menu item, except the last. #topMenu ul … Read more

How to add class to anchor using wp_nav_menu

WordPress does in fact add a current class by default: check where it says: <li id=”menu-item-1688″ class=”current-menu-item”> Within your source code. Now as for the other item, this is a bit tricky. There is two ways to do it assuming that you need the last item for styling. Option #1 is with pure CSS using … Read more

Creating custom menu with custom themes

Directly from the codex: Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files. You should familiarize yourself with … Read more