Multisite Roots child primary_menu navigating to parent

Hi All,

I’m using Roots as a Parent theme for a multisite, which is going swimmingly, but for whatever reason, the child theme/site is routing the main menu items to the main site.

Parent: domain1.com
Child: domain2.com

if you click on the about for domain2.com, it goes to domain1.com/about. You can also see it when you hover over the link.

Any thoughts would be much appreciated.

JD

Is it possible to test this menu with a default theme? That would at least narrow down whether its a Roots issue or not.

Good call. It’s still happening with twentyfourteen, so it looks like it’s not roots.

Thanks!

Actually, was completely mistaken about twentyfourteen.

I just tested it again, and the menus, primary nav and footer nav are working with twentyfourteen. They are not, however, working with roots.

So, <?php dynamic_sidebar('sidebar-footer'); ?>

the child site brings in the parent sites’ footer menu. I’ve removed the custom menu widget, and added a new one. All the links are pulling from the main site. Even when I create a custom menu using links (for the childsitedomain.com/page) instead of pages, it all points back to the parent site’s domain, parentsitedomain.com/page.

Same with the top menu/primary menu. No matter what I do, it’s pulling from the parent site.

So, this is the config:

WP 4 MU
Roots 7
Domain Mapping Plugin

At the request of the client, I cannot post the urls here. If anyone thinks they can help and wants to see the site(s), please email me:

me at justdayan.com

I’ve spent quite some time on this, so if anyone has any guidance about using roots as a parent theme in a multisite environment, I would really appreciate the help.

I’m at a stopping point with this, because i’ve got 12 more sub sites to create, and I have to prove the 1st one works perfectly to continue to the rest.

Everything else with my parent/child theme relationship is working perfectly.

Thanks!

JD

Also, any assistance provided, I will repost my/our findings here to help guide others wanting to use this configuration!

Alright all,

I’ve solved the issue. It was actually two issues. One was another custom menu I had in the header, pulling in a menu from the primary site. I had to use something like this:

        global $blog_id;
        $current_blog_id = $blog_id;
        switch_to_blog(1);

//wp_nav_menu call
switch_to_blog($current_blog_id);
restore_current_blog(); //this was causing the footer issues

The last command was the culprit for causing bloginfo name and footer menu to pull in from the primary site.

The 2nd issue I was having in regards to the primary top menu nav was something else, and I had to interactively restore from git and restore db from those commits to determine where the issue is. I didn’t have time to debug this issue, only to restore the backup and move on.

Anyways, thanks for watching!

JD