How to share primary navigation of main site with subsites usining switch_to_blog

I worked it out. I didn’t enter the correct hook. Here is the code that works for a genesis framework site. add_action(‘genesis_after_header’, ‘primary_library_menu_switch’); function primary_library_menu_switch() { global $blog_id; if ( ! is_multisite() || 2 == $blog_id ) { switch_to_blog( 1 ); wp_nav_menu( array( ‘menu’ => 2, ‘fallback_cb’ => false, ‘menu_class’ => ‘genesis-nav-menu’, ‘theme_location’ => ‘primary’ … Read more