WordPress Navigation

Navigation Menus

  • Register Menu
    • Appears under Appearance -> Menus.
    • function register_my_menu() {
      register_nav_menus(
      array(
      ‘header-menu’ => __( ‘Header Menu’ ),
      ‘extra-menu’ => __( ‘Extra Menu’ )
      )
      );
      }
      add_action( ‘init’, ‘register_my_menus’ );
    • Then include in your template the menu:
      wp_nav_menu( array( ‘theme_location’ => ‘header-menu’ ) );
    • To style, include ‘container_class’ => ‘my_extra_menu_class’ ) );