WordPress.org

Ready to get started?Download WordPress

Forums

custom navigation menu appears on web page but not in admin appearance > menus (3 posts)

  1. johnmerlino
    Member
    Posted 2 years ago #

    Hey all,

    header.php:

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

    functions.php:

    add_action('init', 'menu_register');

    function menu_register() {
    register_nav_menus( array(
    'primary' => __( 'Primary Navigation', 'GuardDog Theme' ),
    ) );
    }

    Then I go to appearance > themes and it just gives me an option to "Create Menu" but I was expecting the primary navigation menu to be already created.

  2. Red Deer Web Design
    Member
    Posted 2 years ago #

    I think you have to create the menu first, then you assign it as Primary once created. On the top left box you can assign it.

  3. johnmerlino
    Member
    Posted 2 years ago #

    thanks for response

Topic Closed

This topic has been closed to new replies.

About this Topic