From: Anthony Talarico Date: Thu, 9 Aug 2018 17:43:32 +0000 (-0400) Subject: adding is_tree function for the separate menu locations X-Git-Tag: v1.0.0^2~92 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=563f519d407f95a5cc7333528ff66752c80b0e1f;p=WP-Themes%2Fcharemisd.git adding is_tree function for the separate menu locations --- diff --git a/functions.php b/functions.php index ea71f68..c1b7f56 100644 --- a/functions.php +++ b/functions.php @@ -180,7 +180,20 @@ function mytheme_search_loop() { ID ); + foreach ( $anc as $ancestor ) { + if( is_page() && $ancestor == $pid ) { + return true; + } + } + return false; +} function is_post_type($type){ global $wp_query; if($type == get_post_type($wp_query->post->ID)) return true;