wp_menu_nav shown only on single page
-
Hi, have some troubles with wp_menu_nav on my site
as i see on travelify/library/structure/header-extensions.php we have code for menu
<?php if ( has_nav_menu( 'primary' ) ) { $args = array( 'menu' => 'primary', 'theme_location' => 'primary', 'container' => '', 'items_wrap' => '<ul class="root">%3$s</ul>' ); echo '<nav id="main-nav" class="clearfix"> <div class="container clearfix">'; wp_nav_menu( $args ); echo '</div><!-- .container --> </nav><!-- #main-nav -->'; } else { echo '<nav id="main-nav" class="clearfix"> <div class="container clearfix">'; wp_page_menu( array( 'menu_class' => 'root' ) ); echo '</div><!-- .container --> </nav><!-- #main-nav -->'; } ?>
they show menu only on single page, on home, category is empty menu. when i do echo has_nav_menu( ‘primary’) on these pages, im get 1 . have no idea what a problem here.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_menu_nav shown only on single page’ is closed to new replies.