Created
September 11, 2017 20:00
-
-
Save CapWebSolutions/edbb26f9e64fe10d1d31695dd5e64a9f to your computer and use it in GitHub Desktop.
Enable WooCommerce Product Gallery Features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Disabling gallery features | |
// This new gallery is off by default for custom and 3rd party themes since it's common to disable the WooCommerce gallery | |
// and replace with your own. To enable the gallery, you can declare support like this | |
add_theme_support( 'wc-product-gallery-zoom' ); | |
add_theme_support( 'wc-product-gallery-lightbox' ); | |
add_theme_support( 'wc-product-gallery-slider' ); | |
// You do not have to support all 3; you can pick and choose. | |
// If a feature is not supported, the scripts will not be loaded and the gallery code will not execute on product pages. | |
//Disabling gallery features | |
remove_theme_support( 'wc-product-gallery-zoom' ); | |
remove_theme_support( 'wc-product-gallery-lightbox' ); | |
remove_theme_support( 'wc-product-gallery-slider' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment