The Lab WooSwipe

WooSwipe

WooSwipe is a clean product gallery for WooCommerce that uses PhotoSwipe and Slick Carousel.

09.12.15
WooSwipe

WooSwipe is a product gallery and should work out of the box with your WooCommerce gallery settings. This gallery is built using PhotoSwipe from Dmitry Semenov and Slick Carousel.

Simply adjust your image sizes in WooCommerce > Settings > Products > Display. You may need to rebuild your thumbnails with a plugin like Regenerate Thumbnails.

 

Features

  • Responsive
  • Keyboard control
  • Full image size
  • 2 colour options
  • Settings located in WooCommerce > WooSwipe

 

Using Shortcodes

Want to easily load the gallery using a product page shortcode? Use the below shortcode (making sure you enter the correct product ID)

[product_page id="1"]

Additionally, put the below code in your functions.php to avoid the first product image to be the same as the featured image.

function remove_featured_image($html, $attachment_id ) {
global $post, $product;
$featured_image = get_post_thumbnail_id( $post->ID );
if ( $attachment_id == $featured_image )
$html = ”;
return $html;
}
add_filter(‘woocommerce_single_product_image_thumbnail_html’, ‘remove_featured_image’, 10, 2);

 

Help! The gallery doesn’t work!

This is usually caused by a Javascript conflict. The easiest way to track down the problem is to remove or disable other scripts. Try the following:

  • Disable other plugins. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
  • Switch to the most recent WordPress base theme to rule out any theme-specific problems.
  • Use a browser debugger to find the error (Chrome is the best). This may help you track down the conflict.
  • ADVANCED! If it’s a theme issue you may have some scripts embedded in your theme that are causing a conflict. To disable these look inside the header.php, footer.php or functions.php files.

 

Wanna try it? View the demo or download.

Dean Oakley

Written by Dean Oakley

Dean founded Thrive Digital in 2006 and has worked in the design and development space ever since. He received 1st Class Honours in a Bachelor of IT and oversees all technical aspects of our projects.