Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created April 23, 2021 04:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalchild/4b2577c1601e8a691b6037b1d3e57bc1 to your computer and use it in GitHub Desktop.
Save digitalchild/4b2577c1601e8a691b6037b1d3e57bc1 to your computer and use it in GitHub Desktop.
Add Theme support for Woocommerce Product gallery Lightbox, zoom and slider
<?php // Do not include this if already open! Code goes in theme functions.php.
add_action( 'after_setup_theme', 'add_wc_gallery_lightbox', 100 );
function add_wc_gallery_lightbox() {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment