Пример #1
0
<?php

if (has_nav_menu('primary')) {
    // Check if there's a menu assigned to the 'primary' location.
    ?>

	<nav <?php 
    hybrid_attr('menu', 'primary');
    ?>
>

		<h3 id="menu-primary-title" class="menu-toggle">
			<button class=""><span class="screen-reader-text"><?php 
    echo hybrid_get_menu_name('primary');
    ?>
</span></button>
		</h3><!-- .menu-toggle -->

		<?php 
    wp_nav_menu(array('theme_location' => 'primary', 'container' => '', 'menu_id' => 'menu-primary-items', 'menu_class' => 'menu-items', 'fallback_cb' => '', 'items_wrap' => '<div class="wrap"><ul id="%s" class="%s">%s</ul></div>'));
    ?>

	</nav><!-- #menu-primary -->

<?php 
}
// End check for menu.
Пример #2
0
<?php

if (has_nav_menu('secondary')) {
    // Check if there's a menu assigned to the 'secondary' location.
    ?>

	<nav <?php 
    hybrid_attr('menu', 'secondary');
    ?>
>

		<h3 id="menu-secondary-title" class="menu-toggle">
			<button class=""><span class="screen-reader-text"><?php 
    echo hybrid_get_menu_name('secondary');
    ?>
</span></button>
		</h3><!-- .menu-toggle -->

		<?php 
    wp_nav_menu(array('theme_location' => 'secondary', 'container' => '', 'menu_id' => 'menu-secondary-items', 'menu_class' => 'menu-items', 'fallback_cb' => '', 'items_wrap' => '<div class="wrap"><ul id="%s" class="%s">%s</ul></div>'));
    ?>

	</nav><!-- #menu-secondary -->

<?php 
}
// End check for menu.