<a id="small-lens" href="http://discoverkzoo.DiscoverKalamazoo.com" target="_blank">#DiscoverKZoo</a>
</div>
<div class="large-8 columns">
+
<ul>
+ <li id="searchIcon"><a><img src="<?php bloginfo('template_url'); ?>/assets/search-icon.jpg"></a></li>
+ <li><?php get_template_part("parts/search"); ?></li>
+<!--
<li><a href="<?php bloginfo('url')?>">Home</a></li>
<li><a href="<?php echo get_permalink(3200);?>">Meetings & Events</a></li>
<li><a href="<?php echo get_permalink(3201);?>"> Sports Planning</a></li>
<li><a href="<?php echo get_permalink(3202);?>">Travel Partners</a></li>
<li><a href="<?php echo get_permalink(3203);?>">Media</a></li>
<li><a href="<?php echo get_permalink(3328); ?>">Blog</a></li>
- <li id="searchIcon"><a><img src="<?php bloginfo('template_url'); ?>/assets/search-icon.jpg"></a></li>
- <li><?php get_template_part("parts/search"); ?></li>
+-->
</ul>
+ <?php glm_theme_top_links(); ?>
</div>
</div>
</header>
<?php
register_nav_menus(array(
- 'top-bar' => 'Site Navigation',
+ 'top-bar' => 'Site Navigation',
'top-links' => 'Header Links'
));
));
}
}
+if ( ! function_exists( 'glm_theme_top_links' ) ) {
+ function glm_theme_top_links() {
+ wp_nav_menu(array(
+ 'container' => false, // remove nav container
+ 'container_class' => '', // class of container
+ 'menu' => '', // menu name
+ 'menu_class' => '', // adding custom nav class
+ 'theme_location' => 'top-links', // where it's located in the theme
+ 'before' => '', // before each link <a>
+ 'after' => '', // after each link </a>
+ 'link_before' => '', // before each link text
+ 'link_after' => '', // after each link text
+ 'depth' => 1, // limit the depth of the nav
+ 'fallback_cb' => false, // fallback function (see below)
+ 'walker' => new Glm_Theme_Top_Bar_Walker()
+ ));
+ }
+}
/**
* Mobile off-canvas
function glm_side_menu($mobile = false) {
global $post;
- // do not use appearance menu for the following page ID's or their ancestors
+ $sideMenu = $allMenu = $pageMenuId = array();
+// do not use appearance menu for the following page ID's or their ancestors
if( !is_page(array(3200, 3201,3202,3203)) && !is_tree(3200) && !is_tree(3201) && !is_tree(3202) && !is_tree(3203)) {
- $sideMenu = $allMenu = $pageMenuId = array();
if (($locations = get_nav_menu_locations()) && isset($locations['top-bar'])) {
- $menu = wp_get_nav_menu_object($locations['top-bar']);
+ $menu = wp_get_nav_menu_object($locations['top-bar']);
+ }
+ } else {
+ if (($locations = get_nav_menu_locations()) && isset($locations['top-links'])) {
+ $menu = wp_get_nav_menu_object($locations['top-links']);
}
+ }
$menu_items = wp_get_nav_menu_items($menu->term_id);
foreach ((array) $menu_items as $key => $menu_item) {
$sideMenu[$menu_item->menu_item_parent][] = $menu_item;
}
echo '</ul>';
// using page menu here for the listed page ID's above
- } else {
-
- $parents = get_post_ancestors($post->ID);
- $id = ($parents) ? $parents[count($parents)-1]: $post->ID;
- $parent = get_page( $id );
- if ($id == 0) {
- $ID = $post->ID;
- } else {
- $ID = $parent->ID;
- }
- echo '<h2>'.get_the_title($ID).'</h2>';
- echo '<ul class="sidebar"><!-- begin -->'."\n";
- echo wp_list_pages( 'child_of='.$ID.'&title_li=&depth=1&echo=0');
- echo '</ul><!-- end -->'."\n";
- }
+// } else {
+//
+// $parents = get_post_ancestors($post->ID);
+// $id = ($parents) ? $parents[count($parents)-1]: $post->ID;
+// $parent = get_page( $id );
+// if ($id == 0) {
+// $ID = $post->ID;
+// } else {
+// $ID = $parent->ID;
+// }
+// echo '<h2>'.get_the_title($ID).'</h2>';
+// echo '<ul class="sidebar"><!-- begin -->'."\n";
+// echo wp_list_pages( 'child_of='.$ID.'&title_li=&depth=1&echo=0');
+// echo '</ul><!-- end -->'."\n";
+// }
}