if ( ! function_exists( 'glm_theme_top_bar' ) ) {
function glm_theme_top_bar() {
echo '<ul>';
+ echo glm_get_top_bar_nav_menu( 'about-menu' );
+ echo glm_get_top_bar_nav_menu( 'district-menu' );
echo glm_get_top_bar_nav_menu( 'students-menu' );
echo glm_get_top_bar_nav_menu( 'parents-menu' );
echo glm_get_top_bar_nav_menu( 'parents-menu' );
echo glm_get_top_bar_nav_menu( 'professionals-menu' );
- echo glm_get_top_bar_nav_menu( 'district-menu' );
echo glm_get_top_bar_nav_menu( 'latest-menu' );
echo '</ul>';
}
}
-if ( ! function_exists( 'glm_theme_top_bar' ) ) {
- function glm_theme_top_bar() {
- 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-bar', // 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' => 3, // limit the depth of the nav
- 'fallback_cb' => false, // fallback function (see below)
- 'walker' => new Glm_Theme_Top_Bar_Walker()
- ));
- }
-}
+// if ( ! function_exists( 'glm_theme_top_bar' ) ) {
+// function glm_theme_top_bar() {
+// 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-bar', // 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' => 3, // limit the depth of the nav
+// 'fallback_cb' => false, // fallback function (see below)
+// 'walker' => new Glm_Theme_Top_Bar_Walker()
+// ));
+// }
+// }
function glm_get_top_bar_nav_menu( $theme_location )
{
$menu = wp_get_nav_menu_object($locations['district-menu']);
}
}
+ if(is_page(45) || 45 == $post->post_parent || is_tree(45)){
+ if (($locations = get_nav_menu_locations()) && isset($locations['about-menu'])) {
+ $menu = wp_get_nav_menu_object($locations['about-menu']);
+ }
+ }
if(is_page(59) || 59 == $post->post_parent || is_tree(59)){
if (($locations = get_nav_menu_locations()) && isset($locations['latest-menu'])) {
$menu = wp_get_nav_menu_object($locations['latest-menu']);