Merge menus together
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 21 May 2015 15:35:57 +0000 (11:35 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 21 May 2015 15:36:33 +0000 (11:36 -0400)
So we can use just one menu

lib/navigation.php
parts/off-canvas-menu.php

index 3cf3aff..85a16ba 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 register_nav_menus(array(
-  'top-bar' => 'Top Bar',
-  'mobile-off-canvas' => 'Mobile',
-  'footer' => 'Footer'
+  'top-bar' => 'Site Navigation',
+  //'mobile-off-canvas' => 'Mobile',
+  //'footer' => 'Footer'
 ));
 
 /**
@@ -38,7 +38,7 @@ if ( ! function_exists( 'munisingcvb_mobile_off_canvas' ) ) {
           'container_class' => '',                        // class of container
           'menu' => '',                                   // menu name
           'menu_class' => 'off-canvas-list',              // adding custom nav class
-          'theme_location' => 'mobile-off-canvas',        // where it's located in the theme
+          'theme_location' => 'top-bar',        // where it's located in the theme
           'before' => '',                                 // before each link <a>
           'after' => '',                                  // after each link </a>
           'link_before' => '',                            // before each link text
@@ -87,4 +87,4 @@ if ( ! function_exists( 'munisingcvb_add_menuclass' ) ) {
       return preg_replace( $find, $replace, $ulclass, 1 );
   }
   add_filter( 'wp_nav_menu','munisingcvb_add_menuclass' );
-}
\ No newline at end of file
+}
index 2bd6794..c35ee84 100644 (file)
@@ -1,9 +1,12 @@
 <aside class="right-off-canvas-menu" aria-hidden="true">
+  <ul class="off-canvas-list">
+    <li><a href="<?php echo home_url(); ?>">Home</a></li>
+  </ul>
   <?php munisingcvb_mobile_off_canvas(); ?>
   <ul class="off-canvas-list extras">
     <li class="has-form">
       <form role="search" method="get" action="<?php echo home_url('/'); ?>">
-        <input type="search" value="" name="s" id="s" placeholder="Search"> 
+        <input type="search" value="" name="s" id="s" placeholder="Search">
       </form>
     </li>
     <li>
@@ -15,4 +18,4 @@
       </ul>
     </li>
   </ul>
-</aside>
\ No newline at end of file
+</aside>