Ver Fonte

adding menu call right in the header

creating another function seemed like overkill. Let’s just drop it
right in there.
Eddie Machado há 12 anos atrás
pai
commit
efc99a6d7c
1 ficheiros alterados com 19 adições e 6 exclusões
  1. 19 6
      header.php

+ 19 - 6
header.php

@@ -45,19 +45,32 @@
 
 			<header class="header" role="banner">
 
-				<div id="inner-header" class="wrap clearfix">
+				<div id="inner-header" class="wrap cf">
 
-					<!-- to use a image just replace the bloginfo('name') with your img src and remove the surrounding <p> -->
+					<?php // to use a image just replace the bloginfo('name') with your img src and remove the surrounding <p> ?>
 					<p id="logo" class="h1"><a href="<?php echo home_url(); ?>" rel="nofollow"><?php bloginfo('name'); ?></a></p>
 
-					<!-- if you'd like to use the site description you can un-comment it below -->
+					<?php // if you'd like to use the site description you can un-comment it below ?>
 					<?php // bloginfo('description'); ?>
 
 
 					<nav role="navigation">
-						<?php bones_main_nav(); ?>
+						<?php wp_nav_menu(array(
+    					'container' => false,                           // remove nav container
+    					'container_class' => 'menu cf',                 // class of container (should you choose to use it)
+    					'menu' => __( 'The Main Menu', 'bonestheme' ),  // nav name
+    					'menu_class' => 'nav top-nav cf',               // adding custom nav class
+    					'theme_location' => 'main-nav',                 // where it's located in the theme
+    					'before' => '',                                 // before the menu
+        			'after' => '',                                  // after the menu
+        			'link_before' => '',                            // before each link
+        			'link_after' => '',                             // after each link
+        			'depth' => 0,                                   // limit the depth of the nav
+    					'fallback_cb' => 'bones_main_nav_fallback'      // fallback function
+						)); ?>
+
 					</nav>
 
-				</div> <!-- end #inner-header -->
+				</div> <?php // end #inner-header ?>
 
-			</header> <!-- end header -->
+			</header> <?php // end header ?>