can’t get simple menu working
-
hello kind person who might help,
i’m learning to build themes from scratch and following theme handbook awa codex.
i can’t display the menu i’ve coded in my theme files and the pages i’ve added to that menu.
i have theme unit test data installed which comes with 3 menu locations: long, testing, and empty.
when i added code below, i got what i believe is the testing menu. i can see my menus in customizer and admin, but i can’t get my Main Menu to display.
register_nav_menus( array( 'main_menu' => __( 'Main Menu', 'namespace' ), 'footer_menu' => __( 'Footer Menu', 'namespace' ), 'social_menu' => __( 'Social Menu', 'namespace' ), ) ); wp_nav_menu( array( 'theme_location' => 'main-menu', 'container' => 'div', 'container_class' => 'main-nav', 'container_id' => 'main-menu', ) );
selecting my menu location doesn’t work. making a new menu and selecting my menu location doesn’t work. i don’t think deleting the TUT menus is the point of the data so i haven’t done that.
also, the container class/id isn’t showing on the menu that does display on the site which leads me to believe it’s not using my menu, but idk.
thanks, ??
- The topic ‘can’t get simple menu working’ is closed to new replies.