From: Anthony Talarico Date: Fri, 24 Mar 2017 12:38:21 +0000 (-0400) Subject: adding post parent checking for featured images X-Git-Tag: v1.0.0^2~48 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2a4dc7d09c3b18a3e0346a0c62cd88789ee49666;p=WP-Themes%2Fmackinawferry.git adding post parent checking for featured images --- diff --git a/functions.php b/functions.php index 7ca0773..de894e3 100644 --- a/functions.php +++ b/functions.php @@ -99,6 +99,10 @@ function glm_site_scripts() function glm_get_header() { global $post; $post_id = $post->ID; + + if ( $post->post_parent && !has_post_thumbnail($post->ID)){ + $post_id = $post->post_parent; + } echo '