Twenty Eleven
On Adding Second Menu to Twenty Eleven (6 posts)

  1. noelhefele
    Posted 5 years ago #

    To add a second menu, I added the following code to my child theme functions.php file.

    adding footer menu, second nav to child theme
     register_nav_menus( array(
     'primary' => __( 'Primary Menu', 'CHILDTHEMENAME' ),
     'secondary' => __( 'Secondary Menu', 'CHILDTHEMENAME'),
     ) );

    This brought up a 2nd menu in the Theme Menu options.

    I then was able to place it in the footer, calling it with the following code:

    <?php // footer menu
    wp_nav_menu( array('container_class' => 'menu-footer',
    'theme_location' => 'secondary' ) ); ?>

    I thought I would post this as I didn't find any explicit information on how to do this... and it seems to have changed slightly from twenty eleven. Hope it helps those who are looking...

  2. superpotion
    Posted 5 years ago #

    Thanks noelhefele - it works (and saved me a bit of scratching about)...

  3. fraubaumann
    Posted 5 years ago #

    Thank you!

  4. globaltimoto
    Posted 5 years ago #


    I was able to use the first part of code here to enumerate the menu.

    Then just use the drag drop admin interface to place a custom menu into a widget.

  5. katjo15
    Posted 4 years ago #

    Great! Very simple, thanks @noelhefele. Is there a way to center this on the page? I tried adjusting the CSS, but no luck. The menu bar starts on the left of the page...Thanks!

  6. chrisboggs
    Posted 4 years ago #

    Heartfelt thanks here too! It was nice to just find a simple core answer and not all the "this is how ftp works" kinda stuff that a full tutorial kinda needs to supply.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic