From d40a92e485025cd81f2e08c1ba2625fac807bfd8 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 14 Jul 2016 16:53:19 -0400 Subject: [PATCH] added ability for product tag to be the header image --- functions.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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"'; -- 2.17.1