WordPress.org

Ready to get started?Download WordPress

Forums

showing a new nav bar (10 posts)

  1. cerberus478
    Member
    Posted 1 year ago #

    Hi

    I want to create a new nav bar called nav, it shows up and everything but when I try to re-order the navigation it doesn't re-order like I would like it to

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Is this a new custom menu area?

  3. cerberus478
    Member
    Posted 1 year ago #

    yes. I went to menu in the wordpress back end. I also forgot to mention that I did this to my header to make it show up.

    <?php wp_nav_menu( array('menu_class' => 'nav', 'theme_location' => 'nav' ) ); ?>
  4. esmi
    Forum Moderator
    Posted 1 year ago #

    Did you register the new menu location in your theme's functions.php file?

  5. cerberus478
    Member
    Posted 1 year ago #

    no i didn't. Can you please tell me

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    function register_my_menus() {
    	register_nav_menu( 'nav', __( 'My custom menu location' ) );
    }
    add_action( 'init', 'register_my_menus' );
  7. cerberus478
    Member
    Posted 1 year ago #

    I have done that and it didn't work

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    In what way didn't it work?

  9. cerberus478
    Member
    Posted 1 year ago #

    When I go the the menu section of cms and I rearrange the links and I refresh the frontend it doesn't change to the way I arranged it.

  10. cerberus478
    Member
    Posted 1 year ago #

    Maybe this will help in my header.php I have

    <?php wp_nav_menu( array( 'menu_class' => 'nav', 'theme_location' => 'nav' ) ); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags