WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a Twenty Twelve theme with a child theme. When the screen is shrunk to less than a certain width a responsive menu is toggled. The problem is that this menu's top level pages look the same as nested ones so I want to modify the menu's template.

I thought this would be a matter of copying the menu's template to my child-theme but the template file is located in wp-includes (it's nav-menu-template.php I belive). How should I modify it so my changes are not erased when I update wordpress? And also with minimum risk of breaking something

share|improve this question
This is something that cannot be achieved using CSS? – vancoder Aug 21 '13 at 17:53
up vote 0 down vote accepted

You won't want to modify any files outside of wp-content unless you're alright with them being blown away during an upgrade.

The best way to modify what you're talking about is in the styles.css file located in the wp-content/themes/twentytwelve folder. This way you just override the specific styles you're not happy with and don't need to worry about upgrades breaking your code. If you want to get a little more advanced, you can start modifying the functions.php and header.php files which house most of the functionality you'd need to modify.

The nav-menu-template.php file you're referring to in wp-includes is just a file that processes in the background and outputs data, the actual visual display is probably in header.php and pulls it's design from styles.css.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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