Replace prettyBox with lightbox – 2015
-
Replace Woocommerce prettyBox with Lightbox – 2015 version
File 1:
/wp-content/themes/YOUR-THEME/woocommerce/single-product/product-image.php
Find:
echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_caption, $image ), $post->ID );
Replace:
echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" title="%s" rel="lightbox[]">%s</a>', $image_link, $image_caption, $image ), $post->ID );
File2 :
/wp-content/themes/YOUR-THEME/woocommerce/single-product/product-thumbnails.php
Find:
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" class="%s" title="%s" data-rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_caption, $image ), $attachment_id, $post->ID, $image_class );
Replace:
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" title="%s" rel="lightbox[]">%s</a>', $image_link, $image_title, $image ), $attachment_id, $post->ID, $image_class );
- The topic ‘Replace prettyBox with lightbox – 2015’ is closed to new replies.