From d88ef5a49cef1d0eaba5eaf0b3ee604a8f9fd900 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Wed, 6 Nov 2019 11:28:04 -0500 Subject: [PATCH] Enable default featured image for product categories --- functions.php | 5 ++++- header.php | 2 +- style.css | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index a0d7d02..4a1d234 100644 --- a/functions.php +++ b/functions.php @@ -198,7 +198,7 @@ function glm_site_scripts() 'glm_foundation', get_template_directory_uri() . '/js/app.js', 'jquery', - '1.0.6', + '1.0.7', true ); wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css'); @@ -242,6 +242,9 @@ function glm_get_header() { $tag = get_queried_object(); $tagID = $tag->term_id; $thumbnail = z_taxonomy_image_url( $tagID); + if (!$thumbnail) { + $thumbnail = get_template_directory_uri().'/assets/default-product-featured.jpg'; + } echo ' style="background-image: url('.$thumbnail.'?v=1.0);padding:0;padding-bottom:20%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 370px; "'; // $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(100), "full"); diff --git a/header.php b/header.php index 766df70..14400dd 100644 --- a/header.php +++ b/header.php @@ -5,7 +5,7 @@ <?php wp_title(); ?> - + diff --git a/style.css b/style.css index 8f1fd19..b2d0922 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: FineWineJourneys Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for FineWineJourneys -Version: 1.0.6.0 +Version: 1.0.7.0 */ -- 2.17.1