<?php endwhile;
}
+function is_tree( $pid ) {
+ global $post;
+ if ( is_page($pid) )
+ return true;
+
+ $anc = get_post_ancestors( $post->ID );
+ foreach ( $anc as $ancestor ) {
+ if( is_page() && $ancestor == $pid ) {
+ return true;
+ }
+ }
+ return false;
+}
add_action('thematic_searchloop', 'mytheme_search_loop');
// End of the Contextual/Highlight Search functions
?>
//}
function glm_side_menu($mobile = false) {
global $post;
- if( !is_page(array(3200, 3201,3202,3203))){
+
+ // 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'])) {
echo '</ul>';
}
echo '</ul>';
+// using page menu here for the listed page ID's above
} else {
- global $post;
+
$parents = get_post_ancestors($post->ID);
$id = ($parents) ? $parents[count($parents)-1]: $post->ID;
$parent = get_page( $id );