wp_nav_menu not rendering menu_class correctly
-
Here is my code in the header
<nav class="col-md-9" role="navigation"> <?php wp_nav_menu( array( 'theme_location' => 'navigation', 'menu' => '', 'container' => false, 'container_class' => 'menu-{menu slug}-container', 'container_id' => '', 'menu_class' => 'nav nav-pills', 'menu_id' => 'menu-{menu slug}', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'depth' => 0, 'walker' => '' ) ); ?> </nav>
an it renders me
<nav class="col-md-9" role="navigation"> <div class="nav nav-pills"> <ul> <li class="page_item page-item-1791 current_page_item"><a href="https://retesz.w.pw/biografia/">Biográfia</a></li> <li class="page_item page-item-1783"><a href="https://retesz.w.pw/">F?oldal</a></li> </ul> </div> </nav>
From what I understand in the codex:
$menu_class
(string) (optional) The class that is applied to the ul element which encloses the menu items. Multiple classes can be separated with spaces. Formerly known as $wrap_class.
Default: menuIt’s supposed to apply the class
nav nav-pills
to the ul, not the container div, especially because I turned off the container with'container' => false
.Can someone explain what I’m doing wrong.
Any help is appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_nav_menu not rendering menu_class correctly’ is closed to new replies.