Skip to content

Instantly share code, notes, and snippets.

Last active July 11, 2016 21:04
What would you like to do?
Add global menu using network-wide-menu
register the menu across the network
register_nav_menu( 'global', 'Global Navigation Menu' );
remove the menu from the menu screen on sub sites to avoid confusing users
add_action( 'admin_init', 'global_nav_menu_init' );
function global_nav_menu_init(){
if ( ! is_main_site() )
unregister_nav_menu( 'global' );
<div class="global-nav-menu">
wp_nav_menu( 'global' );
</div><!-- global-nav-menu -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment