separating the owners and public menus for the topbar and off canvas menu
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 8 Oct 2018 17:44:32 +0000 (13:44 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 8 Oct 2018 17:44:32 +0000 (13:44 -0400)
lib/navigation.php
sections/header.php

index 6073847..8d8764f 100644 (file)
@@ -1,9 +1,10 @@
 <?php
 
 register_nav_menus(array(
-  'top-bar'     => 'Site Navigation',
-  'mobile-menu' => 'Off Canvas',
-  'top-links'    => 'Top Links',
+  'public'          => 'Public Topbar',
+  'owners'          => 'Owners Topbar',
+  'mobile-menu'     => 'Off Canvas',
+  'top-links'       => 'Top Links',
   
 ));
 if ( ! function_exists( 'glm_theme_members_only' ) ) {
@@ -49,12 +50,14 @@ if ( ! function_exists( 'glm_theme_header_links' ) ) {
  * Mobile off-canvas
  */
 if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) {
-    function glm_theme_mobile_off_canvas($location) {
+    function glm_theme_mobile_off_canvas() {
         echo '<div class="left-off-canvas-list">';
         echo '<ul><li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
-        echo glm_get_mobile_nav_menu( 'top-bar' );
         if(is_in_tree(OWNERS_PAGE) ){ 
+            echo glm_get_mobile_nav_menu( 'owners' );
             echo glm_get_mobile_nav_menu( 'top-links' );
+        }else{
+            echo glm_get_mobile_nav_menu( 'public' );
         }
         echo '</ul></div>';
     }
index e214845..3032757 100644 (file)
         
         <nav class="large-12 columns top-bar text-center show-for-large-up opensearchserver.ignore" data-topbar role="navigation" data-options="sticky_on: large">
             <section class="top-bar-section">
-                <?php glm_theme_top_bar('top-bar'); ?>
+            <?php 
+            if(is_in_tree(OWNERS_PAGE) ): 
+                glm_theme_top_bar('owners'); 
+            else:
+                glm_theme_top_bar('public');
+            endif;
+            ?>
             </section>
         </nav>
         <nav class="tab-bar show-for-medium-down">