Default featured image is now vertically centered
authorLaury GvR <laury@gaslightmedia.com>
Tue, 18 Dec 2018 19:41:14 +0000 (14:41 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 18 Dec 2018 19:41:14 +0000 (14:41 -0500)
functions.php

index 91966ab..e50325f 100644 (file)
@@ -387,9 +387,9 @@ function is_post_type($type){
 function glm_get_background() {
     if (has_post_thumbnail()) {
         $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 scroll 0px 0px / cover;;"></div>';
+        $imageUrl = '<div class="featured-image" style="background: url(\''.$image_data[0].'\') no-repeat scroll 0px 0px / cover;"></div>';
     } else {
-        $imageUrl = '<div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/default.jpg?v=1.2.44\') no-repeat scroll 0px bottom / cover;;"></div>';
+        $imageUrl = '<div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/default.jpg?v=1.2.44\') no-repeat scroll 0px center / cover;"></div>';
     }
     return $imageUrl;
 }