Removed extra Home link from off-canvas (only show for left menu)_
authorLaury GvR <laury@gaslightmedia.com>
Fri, 18 Aug 2017 13:47:52 +0000 (09:47 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 18 Aug 2017 13:47:52 +0000 (09:47 -0400)
functions.php

index 43bcd62..0e9e88b 100644 (file)
@@ -155,15 +155,17 @@ endif;
  * Mobile off-canvas
  */
 if ( ! function_exists( 'truenorthgolf_mobile_off_canvas' ) ) {
-  function truenorthgolf_mobile_off_canvas( $top_bar_left ) {
+  function truenorthgolf_mobile_off_canvas( $top_bar_location ) {
       echo '<ul class="left-off-canvas-list">';
-      echo '<li class="page_item"><a href="' . home_url() . '">Home</a></li>';
+      if ($top_bar_location == 'top-bar-left') {
+        echo '<li class="page_item"><a href="' . home_url() . '">Home</a></li>';
+      }
       wp_nav_menu(array(
           'container' => false,                           // remove nav container
           'container_class' => '',                        // class of container
           'menu' => '',                                   // menu name
           'menu_class' => 'off-canvas-list',              // adding custom nav class
-          'theme_location' => $top_bar_left,              // where it's located in the theme
+          'theme_location' => $top_bar_location,              // where it's located in the theme
           'before' => '',                                 // before each link <a>
           'after' => '',                                  // after each link </a>
           'link_before' => '',                            // before each link text