From 563f519d407f95a5cc7333528ff66752c80b0e1f Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 9 Aug 2018 13:43:32 -0400 Subject: [PATCH] adding is_tree function for the separate menu locations --- functions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; -- 2.17.1