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 have a childtheme from twentyeleven,

i created a 'inicio' (name) custom menu,

enter image description here

how can I apply it?


<?php wp_nav_menu( array( 'theme_location' => 'inicio' ) ); ?>

but not working (not even change visible)


Trying now:

header.php: (child)

<?php //wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
<?php wp_nav_menu( array( 'theme_location' => 'inicio' ) ); ?>

functions.php (child)

function register_my_menus() {
register_nav_menus(array('inicio' => 'Inicio Menu'));

And still seeing 'default' navigation menu

share|improve this question
up vote 1 down vote accepted

You should have a theme locations dropdown titled inicio, select the menu you created here and it will work.

Alternately, if you just want to replace the main menu, select inicio in the Theme Locations box under Primary Menu.

share|improve this answer

Have you registered 'inicio' as a new menu?

For example you'll need to add to theme's functions.php file

  add_theme_support( 'menus' );
  add_action( 'init', 'register_my_menus' );

  function register_my_menus() {
    register_nav_menus(array('inicio' => 'Inicio Menu'));

Informs WordPress that you're going to be using a Menu in this theme called 'inicio' and it should be shown in the administration backend as 'Inicio Menu'.

I'm not 100% sure of the child-parent theme relates in terms of adding a new menu, but hopefully this puts you in the right direction.

Once added to functions and your theme, your backend custom menus should give you Theme Locations - where you pick the custom menu name, and associate it to the location name on the theme (I've pretty much used the same names on my site, but hindsight I should have perhaps called the locations 'placeholder' or something similar).

See http://i.stack.imgur.com/Kwypd.png for snapshot of how theme locations appear when they are registered. (Curses to less than 10 rep and no image posting)

share|improve this answer
tried that in a blank php file and still seeing the 'default' menu (home /// sample page). Any idea why? – Toni Michel Caubet Oct 4 '11 at 13:41
Try de-selecting your current child-theme, save/reload and then reload the child theme again. – Darren Nolan Oct 4 '11 at 13:48
In your child's theme header.php file - Can you please add something random - just pure HTML like <p>Hey I'm here</p> - to see if you're getting to the right header.php file? If you've made changes (and can see them) to header.php ignore this comment <_< – Darren Nolan Oct 4 '11 at 14:18
yes i made other changes in functions.php and header.php and they take effect... have you seen my edit? did i make the menu correctly? – Toni Michel Caubet Oct 4 '11 at 14:26
hold up - i think i see the issue. – Darren Nolan Oct 4 '11 at 16:00

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.