0

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

0

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

0

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.

    <ul>
        <?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 ?>
    </ul>

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 you have read our privacy policy.

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