Site logo

Archived topic

Hide product thumbnails on mobile view

7 replies · Started by Sam on March 22, 2021

Viewing posts 1–8 of 8

Hi team,

Simple installation of GP Premium + Woocommerce.

Tried unsuccessfully going through past threads / instructions to hide product thumbnails / gallery under the main image on product pages.

What's the best method to do this please? Might need a step-by-step!

Thanks in advance,

Sam

Hi there,

1. Install the Code Snippets plugin:

https://wordpress.org/plugins/code-snippets/

2. Create a new Snippet and add this code:

function remove_image_zoom_support() {
    remove_theme_support( 'wc-product-gallery-lightbox' );
}
add_action( 'wp', 'remove_image_zoom_support', 100 );

3. Save the snippet.

Hi David,

Thanks for getting back to me - it doesn't appear to have made any changes...

I have disabled caching completely for the time being.

Also just wanted to reiterate I'm trying to hide the thumbnails under the single product view on mobile only (just in case).

Thanks once again,

Sam

To remove it only only mobile you would need to use CSS to hide it:

@media(max-width: 768px) {
  .woocommerce div.product div.images .flex-control-thumbs {
    display: none;
  }
}

Hi David,

I have tried all the "obvious" methods, well maybe most of them through my own knowledge and through the support threads - and so needed to turn to the experts :)

I have added this to the css and it's still showing I'm afraid :( Left it in for now.

Sam

Where did you add the CSS? Is it in the Customizer > Additional CSS ? If so can you move it to the very top of the code

That's done it, thank you :D

You're welcome

This archived topic is closed to new replies.