From: Anthony Talarico Date: Fri, 2 Feb 2018 16:04:11 +0000 (-0500) Subject: changing default header image for package details X-Git-Tag: v1.0.12^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b272a03e4a78c4fce7003b3d9744e7dd077a684b;p=WP-Themes%2Ftroutcreek.git changing default header image for package details changing default featured image for the package detail pages --- diff --git a/assets/package_default.jpg b/assets/package_default.jpg new file mode 100644 index 0000000..a4e6c0a Binary files /dev/null and b/assets/package_default.jpg differ diff --git a/functions.php b/functions.php index 45d822c..0741882 100644 --- a/functions.php +++ b/functions.php @@ -76,17 +76,20 @@ function glm_site_scripts() } - /* Header for posts*/ function glm_get_header() { - echo 'post_type == 'page') { - $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); - echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "'; + $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); + echo ' style="background-image: url('.$image_data[0].');height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px; "'; + } else if($post->post_type == 'troutcreek_package') { + echo ' style="background-image: url('.get_template_directory_uri().'/assets/package_default.jpg);height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"'; + echo ' class="no-featured"'; } else { - echo ' style="background-image: url('.get_template_directory_uri().'/assets/lobby.jpg);height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"'; - echo ' class="no-featured"'; + echo ' style="background-image: url('.get_template_directory_uri().'/assets/lobby.jpg);height:0;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat;max-height: 300px;"'; + echo ' class="no-featured"'; } echo '>'; echo ''; diff --git a/parts/header-meta.php b/parts/header-meta.php index 39080bc..b6b39b5 100644 --- a/parts/header-meta.php +++ b/parts/header-meta.php @@ -2,6 +2,6 @@ <?php wp_title(); ?> - + \ No newline at end of file diff --git a/style.css b/style.css index 0b76546..4d4bcce 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: TroutCreek Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for TroutCreek -Version: 1.0.11 +Version: 1.0.12 */