From: Laury GvR Date: Mon, 13 Nov 2017 19:20:42 +0000 (-0500) Subject: Change featured image for post pages X-Git-Tag: v1.1.34^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=38b7d58456d9ba9768f58b83c163948bb6581b2e;p=WP-Themes%2FDiscoverKZOO.git Change featured image for post pages --- diff --git a/assets/blog-featured.jpg b/assets/blog-featured.jpg new file mode 100644 index 0000000..001ba5e Binary files /dev/null and b/assets/blog-featured.jpg differ diff --git a/functions.php b/functions.php index b4fd8fa..694da8a 100644 --- a/functions.php +++ b/functions.php @@ -109,6 +109,8 @@ 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()) { + 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;"'; echo ' class="no-featured"';