Within the network admin, the My Sites link, is not linking to the main parent site. Instead, it links to a child site blog. How can I change this link? Is there a way to rebuild WP menu? I haven't a clue how it became the wrong link.

enter image description here

2 Answers 2


I fixed this by deactivating then reactivating the child site under Network Admin > Sites.


In my case, it occurred through the switch_to_blog() and restore_current_blog() functions in our theme. We called restore_current_blog() at the wrong position.

        <?php foreach ($posts as $post):
            switch_to_blog($post->blog_id); ?>
            <li><?php the_title();?></li>
            <?php restore_current_blog(); // correct position ?>
        <?php endforeach;?>
        <?php // restore_current_blog(); // wrong position ?>

We have to call restore_current_blog() each time in forearch syntax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.