From: Ian Weller Date: Tue, 8 Sep 2015 13:18:03 +0000 (-0400) Subject: logo added to topbar X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b3256b226962059f55d3fd38de6911c6bf2b1a2b;p=WP-Themes%2Fmichsci.git logo added to topbar --- diff --git a/functions.php b/functions.php index 1f5df9d..e24300a 100644 --- a/functions.php +++ b/functions.php @@ -40,7 +40,7 @@ function glm_get_menu_options() return $menu_options; } - +/** register_nav_menus(array( 'top-bar' => 'Site Navigation', //'mobile-off-canvas' => 'Mobile', @@ -52,7 +52,7 @@ if ( ! function_exists( 'michsci_top_bar' ) ) { wp_nav_menu(array( 'container' => false, // remove nav container 'container_class' => '', // class of container - 'items_wrap' => '', + 'items_wrap' => '', 'menu' => '', // menu name 'menu_class' => '', // adding custom nav class 'theme_location' => 'top-bar', // where it's located in the theme @@ -81,7 +81,7 @@ class MichiganSci_Top_Bar_Walker extends Walker_Nav_Menu { } } endif; - +*/ /** * glm_page_menu * @@ -106,7 +106,9 @@ function glm_page_menu($parent = 0, $class = '') } $pages = get_pages($args); echo ''."\n"; + $mainPageCount = 1; foreach ($pages as $page) { + // echo '
'.print_r($page,true).'
';exit; $childs = get_pages('child_of=' . $page->ID); if (count($childs) > 0) { echo '
  • '."\n"; @@ -116,6 +118,19 @@ function glm_page_menu($parent = 0, $class = '') } else { echo '
  • '.$page->post_title.'
  • '."\n"; } + if ($page->post_parent == 0) { + if ($mainPageCount == 0) { + echo ''."\n"; + } + if ($mainPageCount == 6) { + echo '
  • '."\n"; + } + ++$mainPageCount; + } } echo ''."\n"; } diff --git a/parts/top-bar.php b/parts/top-bar.php index 23e9429..d154377 100644 --- a/parts/top-bar.php +++ b/parts/top-bar.php @@ -1,6 +1,6 @@