Can you please tell me how to create a secondary menu

HI,

Can you please tell me how to create a secondary menu in wordpress? I have a theme and have the primary menu created but want to create a secondary menu. As you can see here:

http://www.homefrontmagazine.com/

I want to control that second menu that is above the image.

Corn

  • Aicee Taguilaso
    • WordPress Warrior

    Hi Corn!

    Try adding this code to your theme’s function.php file:

    register_nav_menus( array(
    'primary' => __( 'Primary Menu'),
    'secondary' => __( 'Secondary Menu'),
    ) );

    It will then create the menu in your Menu > Manage Locations area.

    Then, just add the following code in your header.php, if you want the secondary menu to be added on the header.

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

    Let me know if this helps! :slight_smile:

    Regards,

    Aicee

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.