Answer the question
In order to leave comments, you need to log in
How to properly display menu in WordPress?
The following menu structure is required
<nav>
<ul class="header-menu">
<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
</ul>
</nav>
<?php
$args = array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'navigation',
'menu_class' => 'header-menu',
'depth' => 1
);
wp_nav_menu( $args );
?>
<nav class="header-menu"><ul>
<li class="page_item page-item-2"><a href="#">Item 1</a></li>
<li class="page_item page-item-98"><a href="#">Item 2</a></li>
<li class="page_item page-item-96"><a href="#">Item 3</a></li>
</ul></nav>
Answer the question
In order to leave comments, you need to log in
$args = array(
'theme_location' => 'primary',
'container' => false,
'items_wrap' => '<nav><ul class="header-menu">%3$s</ul></nav>',
'depth' => 1
);
wp_nav_menu( $args );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question