Pages under Day Trip have default featured image
authorLaury GvR <laury@gaslightmedia.com>
Wed, 15 Feb 2017 14:21:21 +0000 (09:21 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 15 Feb 2017 14:21:21 +0000 (09:21 -0500)
Any page under the Day Trip navigation item (page id 116) will now
be showing the default featured image instead of the one assigned
to them.

functions.php

index 7f9da34..78d3e81 100644 (file)
@@ -78,8 +78,8 @@ function glm_site_scripts()
 /* Header for posts*/
 function glm_get_header() {
     echo '<div';
-
-    if (has_post_thumbnail()) {
+    global $post;
+    if (has_post_thumbnail() && (wp_get_post_parent_id( $post->ID ) !== 116)) {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
             echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:25%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height:450px;margin:0 auto;height:100%; "';
     } else {