Enable Lightbox and Extra Media Functionality to WooCommerce 3.0 Themes

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.)

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!


Default Windows IIS WordPress web.config XML

Recently I was migrating a test site from a Linux/cPanel based web-host over to a Windows Server running IIS. After migration, none of the site’s pages or posts worked and all returned 404 errors.

I’m familiar with .htaccess files causing 404 problems so I knew that was probably the issue, and since this was now on a Windows server I knew it had to be the IIS equivelant file “web.config” causing problems. Upon further investigation I realized there was no web.config file at all even though I was used to it always being there after setting WordPress up through IIS. Since I’m using Server 2016 for the first time, perhaps things are different and web.config files aren’t created automatically any longer.

Either way, my problem was solved by adding this XML to a newly created web.config file in the site’s root folder:

Now pages and posts are working properly and pretty permalinks are functioning as they should! Note: If “URL Rewrite” is not installed then it will need to be first in order for this to work.