From: Laury GvR Date: Wed, 22 Aug 2018 16:39:04 +0000 (-0400) Subject: Add version numbers to featured images to avoid caching X-Git-Tag: v1.0.15^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=cecfff1b89075d8662efbfbefb48f7212806a0d0;p=WP-Themes%2Fvisitescanaba.git Add version numbers to featured images to avoid caching --- diff --git a/functions.php b/functions.php index 2147613..c0ec642 100644 --- a/functions.php +++ b/functions.php @@ -78,9 +78,9 @@ function glm_get_header($memberID = false) { if ((has_post_thumbnail() && $post->post_type == 'page')) { $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full"); $image_data = $image_data[0]; - echo ' style="background-image: url('.$image_data.');height:0;padding:0;padding-bottom:32%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 600px; "'; + echo ' style="background-image: url('.$image_data.'?v=1.0);height:0;padding:0;padding-bottom:32%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 600px; "'; } else if (!is_page('member-detail')) { - echo ' style="background-image: url('.get_template_directory_uri().'/assets/default.jpg);height:0;padding:0;padding-bottom:32%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 600px; "'; + echo ' style="background-image: url('.get_template_directory_uri().'/assets/default.jpg?v=1.0);height:0;padding:0;padding-bottom:32%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 600px; "'; } else { echo ' class="no-featured"'; }