• LarryRoss

    (@larryross)


    I’ve looked an looked – can you help?

    I designed a simple template, but it does not include a nav menu. I wanted to include the WP nav, but can’t figure out how to do it. I realize I must call it in custom_functions.php and include a reference to in the template itself.

    1) What php code do I need to call it? Where do I put it (specifically)
    2) How do I reference it in the template (after, I guess, create a div called “nav” above everything I designed)
    3) Since I will be creating 20 pages (all based on the same template) will I have to add a page id for each one on them and where?

    I reviewed a few wordpress doc and have tried to find a tutorial (or video tutorial) – but no luck.

    Thanks,
    Larry

Viewing 1 replies (of 1 total)
  • Chip Bennett

    (@chipbennett)

    In functions.php:

    register_nav_menus( array(
         'my_nav_menu' => 'My Nav Menu'
    ) );

    Then, where appropriate in your template file:

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

Viewing 1 replies (of 1 total)
  • The topic ‘How do I include WP nav menu in a custom template?’ is closed to new replies.