Update menu again
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 18 Oct 2016 19:00:35 +0000 (15:00 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 18 Oct 2016 19:00:35 +0000 (15:00 -0400)
Offcanvas update for when to output the home item.

lib/navigation.php

index 13caab2..7c319b7 100644 (file)
@@ -123,7 +123,9 @@ function glm_page_menu($parent = 0, $class = '',$page_ids = [])
     }
     $pages = get_pages($args);
     echo '<ul'.(($class)?' class="'.$class.'"':'').'><!-- begin -->'."\n";
-    echo '<li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
+    if ( $parent === 0 ) {
+        echo '<li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
+    }
     foreach ($pages as $page) {
         $childs = get_pages('child_of=' . $page->ID);
         if (count($childs) > 0) {