From: Laury GvR Date: Thu, 8 Nov 2018 16:48:05 +0000 (-0500) Subject: Attempt to fix protected posts X-Git-Tag: v1.0.1^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2b0c632c337c09b46aaecafe1a42cf4bba71a02e;p=WP-Themes%2Flakesideclub.git Attempt to fix protected posts --- diff --git a/functions.php b/functions.php index 2e8a7f7..5d24398 100644 --- a/functions.php +++ b/functions.php @@ -224,10 +224,12 @@ add_action('thematic_searchloop', 'mytheme_search_loop'); * 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 ) { @@ -236,6 +238,7 @@ function is_in_tree_theme( $pid, $pageID ) { } } } + echo "Not in tree"; return false; } // if (!function_exists('is_in_tree')) {