Gallery Captions for WooCommerce

Overview ↑ Back to top

Gallery Captions for WooCommerce adds captions to the photo gallery on WooCommerce’s the single-product pages.

The currently displayed image’s Title and Caption are displayed below the image, both on the page and in the expanded lightbox view.

Installation ↑ Back to top

Install the extension by going to the Plugins section of your WordPress Admin, click the Add New button beside the title, click the Upload Plugin button beside the title of the next page, choose the ZIP file you downloaded after purchasing Gallery Captions for WooCommerce, and click the Install Now button.

Once the plugin is installed you will be given the option to activate it. It must be activated to work. If you choose not to activate it now you can later by going to Plugins in your WordPress Admin and clicking the Activate link below Gallery Captions for WooCommerce.

Configuration ↑ Back to top

No configuration is required, or possible. If the plugin is activated captions will be shown, if not no captions will be shown.

Styling ↑ Back to top

No styling is included other than one CSS rule to make the image title visible in the Lightbox, (otherwise it’s black on black), but there’s a pretty good chance it’ll look good without anything special. If it doesn’t look quite how you want you can add styles to your theme’s stylesheet or to the WordPress’s custom CSS feature, (go to Appearance > Customize > Additional CSS in the WordPress Admin).

The markup for the captions looks like this:

<div class="gcw-caption">
<h5>The image title goes here</h5>
<p>The image caption goes here</p>
</div>

If either the title or caption is empty then the entire h5 or p is omitted.

You can target the on-page lightbox captions separately by using the CSS selector .woocommerce-product-gallery .gcw-caption for the on-page gallery and .pswp .gcw-caption for the lightbox.

Frequently Asked Questions ↑ Back to top

How do I configure the captions? ↑ Back to top

The only configuration is turning the captions on or off. This is accomplished by activating or deactivating the extension on the Plugins page of the WordPress admin.

How do I set the captions? ↑ Back to top

The captions are the image’s title and caption. You can edit these in the “Media” section of your WordPress Admin, or when updating the photo gallery for your product.

Two screenshots pointing showing the Title and Caption fields, and what they change on the Product page.
Updating this Title and Caption field in the “Add Media” or “Choose Gallery” screen sets at Title and Text of the image’s caption.

Troubleshooting ↑ Back to top

Image captions may be hidden when different variations are selected ↑ Back to top

If product image magnification is on WooCommerce doesn’t seem to update the height of the element that contains the images when swapping to a new variation image, so if the new image is taller than the old one some of the content below the image, (and part of the new image itself), may be hidden.

Until this is fixed in WooCommerce the best option is to keep images the same height, or at least the same aspect ratio, (so all square, or all 4:3).

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top