From: Anthony Talarico Date: Thu, 14 Jul 2016 20:53:19 +0000 (-0400) Subject: added ability for product tag to be the header image X-Git-Tag: v1.0.0^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d40a92e485025cd81f2e08c1ba2625fac807bfd8;p=WP-Themes%2Ffrancejourneys.git added ability for product tag to be the header image --- diff --git a/functions.php b/functions.php index 24e52e9..1f062bb 100644 --- a/functions.php +++ b/functions.php @@ -225,18 +225,26 @@ function glm_get_header() { if ( $post->post_parent && !has_post_thumbnail($post->ID)){ $post_id = $post->post_parent; } - echo '
term_id; + + $thumbnail = z_taxonomy_image_url( (int)$object->object_id ); + + echo ' style="background-image: url('.$thumbnail.');padding:0;padding-bottom:20%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 370px; "'; + } else { echo ' style="background-image: url('.get_template_directory_uri().'/assets/header-images-2.jpg);padding:0;padding-bottom:30%;background-position:center center;background-size:cover;background-repeat:no-repeat;max-height: 370px; "'; echo ' class="no-featured"';