tokyoterri
Sophomore
Just Getting Started
Member Likes (0)
Hi:
I hired a designer, who's not familiar with WPMU themes, but who knows more php and css than I do, to make some custom changes to the theme that I couldn't manage.
site is: http://few.modernmediajapan.com/
I needed some navigation bar changes, which he did, but his question is:
how can main-navigation.php file be edited in child theme and take navigation from there not from parent theme?
of course, everything should be able to be edited in the Child theme, but I'm not sure what to tell him so that he can do it that way.
looking forward to your reply,
thanks,
Terri

Responses (8)
Lifetime Member (joined September 2010) Likes (0)
Hi Terri,
Just copy main-navigation.php from bp-scholar\includes\main-navigation.php
to bp-scholar-child\includes\main-navigation.php
Then start editing main-navigation.php in the child theme folder
:)
Lifetime Member (joined September 2010) Likes (0)
Also, you can pass this great article to your designer, http://premium.wpmudev.org/the-buddypress-manual/what-are-parent-and-child-themes/
:0)
DEV Diva (joined February 2012) Likes (0)
Hi tokyoterri
Greetings from the WPMU DEV Support Team and thank you for using the Scholar Theme!
I think riyaku said it very well. His advice and the BuddyPress Manual should get you sorted.
I'm resolving this thread, but please do let me know if you're still facing problems with setting up the child theme or if you have more questions related to this thread. Simply post them below select the 'Mark as Not Resolved (re-open)' box below the post area (otherwise we might miss your follow-up request).
@riyaku
Thank you for being a very helpful WPMU DEV User. I think it deserves a point - I saw you're 1 short of 700, so here goes!
A great day to both of you!
Gina :: Multiplicity
Trying out as WPMU DEV Support Staff - Let me know how I go
Member (joined June 2010) Likes (0)
Thank you to you both! I'll let him know.
best,
Terri
Member (joined June 2010) Likes (0)
Hi:
I let him know, and here's what he said:
Terri, I already did this and didn't worked. It seems to be something wrong as there was still used the navigation from parent theme. What I did. I copied the main-navigation.php file from includes folder of parent theme in the includes directory (that I created) in child theme.
Can you have a look at the site to see what might be wrong? Or is there perhaps a troubleshooting page for when this happens? I need to get it resolved, but since we're doing it the normal way and it's not working, maybe there's a setting or something that's wonky.
your help will be appreciated.
thanks,
Terri
Member (joined June 2010) Likes (0)
Hi:
I still don't have an answer to this one: my designer followed the manual and the problem persists: of course, it's going to be a huge problem for the client (and me) when the theme updates, so I'd love to have someone look at this and see what's wrong.
Looking forward to your response,
thanks,
Terri
WPMU DEV Fanatic (joined October 2009) Likes (0)
Hi Terri,
Just jumping in here to add a couple things. Taking in a look at the theme's header.php file I notice there's a get_template_directory() function call on line 138 regarding main-navigation.php.
That function will get the parent theme's directory rather than the child theme's directory so WordPress won't be looking for main-navigation.php in the child theme's folder.
What you could perhaps do, though it's a bit of a rough workaround, is place a copy of header.php in your child theme's folder and change in that file, line 138 like so:
<?php load_template (get_stylesheet_directory() . '/includes/main-navigation.php'); ?>You could then place your adjusted copy of main-navigation in an /includes/ folder in your child theme (you'd need to create that folder in your child theme).
I believe that'd work and looking at main-navigation.php, there are references to locate_template(), which should still access the parent theme's folder for other files.
Perhaps that'd do it for ya?
-David
Member (joined June 2010) Likes (0)
Hi David:
Thank you!!!!!
I gave your note to my designer, he did it, and it works.
I can't thank you enough. can't imagine why this is messed up in the theme to begin with, but very glad to see the fix, and hopefully others will as well.
yayyy! :-)
best,
Terri
Become a member