display custom menu on each site (3 posts)

  1. Raisis
    Posted 5 years ago #


    I created a custom menu called 'mainmenu' and insert this code to my header.php:

    <?php wp_nav_menu( array( 'menu' => 'mainmenu' )); ?>

    This menu appears on my main site and all sites and articles of my main blog. But when I switch to another blog of my multisite network, the menu disappears. Is it possible to display one custom menu on all multisite sites without creating the menu again and again for each blog?

  2. just before the nav bar code put
    <?php switch_to_blog(1); ?>
    right after the navbar code put
    <?php restore_current_blog(); ?>
    then it will always show the pages from Blog #1.

  3. Raisis
    Posted 5 years ago #

    You are my hero :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.