* or a descendent thereof.
*/
function is_in_tree_theme( $pid, $pageID ) {
- if ( is_page( $pid ) ) {
+ if ( is_page( $pid ) || is_single( $pid ) || is_category( $pid ) || ( $pid = get_option( 'page_for_posts' ) ) ) {
+ echo "Yeah am ancestor";
return true;
}
if ( $pageID ) {
+ echo "Yeah in ancestor tree";
$anc = get_post_ancestors( $pageID );
foreach ( $anc as $ancestor ) {
}
}
}
+ echo "Not in tree";
return false;
}
// if (!function_exists('is_in_tree')) {