testing the blog background image fix for archives and categories
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 11 Dec 2018 14:36:52 +0000 (09:36 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 11 Dec 2018 14:36:52 +0000 (09:36 -0500)
functions.php

index efb1852..a837069 100644 (file)
@@ -134,7 +134,7 @@ function glm_site_scripts()
 
 /* Header for posts*/
 function glm_get_background() {    
-    if (has_post_thumbnail()) {
+    if (has_post_thumbnail() && !is_archive() && !is_category()) {
         $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
         $imageUrl = '<div class="featured-image" style="background: url(\''.$image_data[0].'\') no-repeat center center / cover"></div>';
     } else {