changing photo gallery background size to cover
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 28 Jun 2016 18:44:25 +0000 (14:44 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 28 Jun 2016 18:44:25 +0000 (14:44 -0400)
functions.php

index 623a96b..14871a5 100644 (file)
@@ -97,7 +97,7 @@ function woo_photos_content() {
     foreach( $attachment_ids as $attachment_id ) 
     {
             $full_url = wp_get_attachment_image_src( $attachment_id, 'full' )[0];
-            echo '<div class="product_gallery_images" style="background: url(' . $full_url . ') no-repeat center center; background-size: 100% 100%;" ></div>'; 
+            echo '<div class="product_gallery_images" style="background: url(' . $full_url . ') no-repeat center center; background-size: cover;" ></div>'; 
     }
 
 }