• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Gallery Pro and Woocommerce's New Gallery Fix

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Gallery Pro and Woocommerce's New Gallery Fix

This topic is: resolved

Tagged: gallery, Gallery Pro, WooCommerce

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 2 months ago by Ben Siegfried.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 22, 2017 at 5:06 pm #205164
    Ben Siegfried
    Participant

    Gallery Pro with Woocommerce’s new gallery causes the main single product image to shift to the right. After poking around CSS, I added the following for it and checked it out on both desktop and mobile and it appears to be the fix:

    Providing you are adding the Woocommerce's new gallery like this in the functions.php file:

    add_action( 'after_setup_theme', 'yourtheme_setup' );
    
    function yourtheme_setup() {
    add_theme_support( 'wc-product-gallery-zoom' );
    add_theme_support( 'wc-product-gallery-lightbox' );
    add_theme_support( 'wc-product-gallery-slider' );
    }

    Add this to the stylesheet to correct for the main single product image shifting to the right:

    .woocommerce-product-gallery__image.flex-active-slide {
        left: -40px;
    }
    https://coronadosurfdesigns.com/product/t-shirts/coronado-island-tuberider-mens-t-shirt/
    April 22, 2017 at 6:44 pm #205165
    Ben Siegfried
    Participant

    Here's a better fix than the previous CSS rule, disregard that one, use this one:

    /* WooCommerce 3.0 Gallery
     * ======================================================================= */
    
    .woocommerce-product-gallery {
    position: relative;
    margin-bottom: 3em
    }
    
    .woocommerce-product-gallery figure {
    margin: 0
    }
    
    .woocommerce-product-gallery .woocommerce-product-gallery__image:nth-child(n+2) {
    width: 25%;
    display: inline-block
    }
    
    .woocommerce-product-gallery .flex-control-thumbs li {
    list-style: none;
    float: left;
    cursor: pointer
    }
    
    .woocommerce-product-gallery .flex-control-thumbs img {
    opacity: .5
    }
    
    .woocommerce-product-gallery .flex-control-thumbs img.flex-active,.woocommerce-product-gallery .flex-control-thumbs img:hover {
    opacity: 1
    }
    
    .woocommerce-product-gallery img {
    display: block
    }
    
    .woocommerce-product-gallery--columns-3 .flex-control-thumbs li {
    width: 33.3333%
    }
    
    .woocommerce-product-gallery--columns-4 .flex-control-thumbs li {
    width: 25%
    }
    
    .woocommerce-product-gallery--columns-5 .flex-control-thumbs li {
    width: 20%
    }
    
    a.woocommerce-product-gallery__trigger {
    text-decoration: none;
    }
    
    .single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    overflow: hidden;
    }
    
    .single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger:hover {
    background-color: #b89a7b;
    border-color: #b89a7b;
    }
    April 29, 2017 at 3:21 pm #205530
    Susan
    Moderator

    Thanks for sharing...

    April 29, 2017 at 3:36 pm #205545
    Ben Siegfried
    Participant

    You're welcome!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Gallery Pro and Woocommerce's New Gallery Fix’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble