wp_nav_menu not parsing properly..?
-
Hello,
Hoping for some advice from the awesome WP community.
On my local server, I have WP 6.02 installed, and everything works great. On my online “staging” site, I also have 6.02 installed, but something ain’t working right with wp_nav_menu(). Here is the relevant code in my header.php file:
<div id='nav_menu-container' class='nav_menu-container'> <?php if ( has_nav_menu( 'main' )) { wp_nav_menu( [ 'menu' => 'Main Menu', 'theme_location' => 'top', 'container' => 'nav', 'container_id' => 'main_menu-container', 'menu_id' => 'main_menu', 'menu_class' => 'main_menu', ]); } americancyanide_login_menu(); ?> </div>
I have assigned a class to the nav container of main_menu-container. The generated UL is then supposed to get the ‘main_menu’ id and class. Again, on my local server, works perfect, but on my online version, the main_menu class is put on the nav container, thus rendering the CSS rules useless.
Have I forgotten to do something?
- This topic was modified 2 years, 5 months ago by . Reason: Removed the tabs from the code sample so scrolling to view is not necessary
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_nav_menu not parsing properly..?’ is closed to new replies.