From: Laury GvR Date: Mon, 13 Nov 2017 19:23:36 +0000 (-0500) Subject: Fixed 'is_post' to 'is_post_type('post')' X-Git-Tag: v1.1.34^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=4d89b81b8a40ead3a9a3d8898cc31044eb6ba741;p=WP-Themes%2FDiscoverKZOO.git Fixed 'is_post' to 'is_post_type('post')' --- diff --git a/functions.php b/functions.php index 694da8a..ce0de93 100644 --- a/functions.php +++ b/functions.php @@ -109,7 +109,7 @@ function glm_get_header() { if (has_post_thumbnail() && (!(is_home()) ) && (!(is_single())) && (!(is_archive())) && (!(is_search()))) { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); echo ' style="background-image: url('.$image_data[0].');height:300px;padding:0;padding-bottom:300px;background-position:center center;background-size: 100% 100%;background-repeat:no-repeat;max-height: 300px; "'; - } else if (is_post()) { + } else if ( is_post_type( 'post' ) ) { echo ' style="background-image: url('.get_template_directory_uri().'/assets/blog-featured.jpg);height:300px;padding:0;padding-bottom:300px;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 300px;"'; } else { echo ' style="background-image: url('.get_template_directory_uri().'/assets/stay.jpg);height:300px;padding:0;padding-bottom:300px;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 300px;"';