Last Updated on May 20, 2017
I upgraded a WooCommerce site using the theme Wp Portfolio and all my products started opening images in new tabs rather than a lightbox.
First I made sure my theme was updated, but it made no difference. So, naturally I started searching Google for answers. It turns out that WooCommerce 3.0 added new/different media functionality which removed the old lightbox and most WooCommerce geared themes haven’t been updated to use the new functionality.
In order to enable the new media functionality on my WP Portfolio theme I edited the functions.php file by finding the add_action(‘after_setup_theme’, ‘wp_portfolio_setup’); line and add the following three lines below it. (Your line will have wp_portfolio replaced with your themes slug instead.)
add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' );
and the functions.php will look like this:
giving your WooCommerce store functionality like this:
Enjoy your newly working Zoom features and fixed Lightbox functionality! Don’t forget to bug your theme developer to update their theme release with the new WooCommerce 3.0+ media functionality!
John started JSnowCreations as a place to post random tech guides and product reviews. However, while shopping for his daughter’s first “big girl” bed in 2019 he learned about the hidden dangers of fiberglass in mattresses. Since then, John has made it his mission to expose as much hidden fiberglass in mattresses as possible. His ultimate goal is federal regulations that ban fiberglass from being used in mattresses, or at least a law that require it to be listed in the material tags.