Archived topic
Product image not showing on single products (shows on mobile)
9 replies · Started by Alex Cooper on May 19, 2021
Hiya,
Got some products on my site running the "niche" layout and for some reason the images aren't showing on desktop/tablet:
https://affiliatemarketingmugs.com/product/i-make-money-while-i-sleep/
Can you help?
Hi there,
the Niche site uses a custom Hook function to display a stacked gallery on desktop - see here:
https://gpsites.co/niche/the-single-product/
Doesn't look like you're using that on your site - so in Customizer > Additional CSS - you need to delete the following code:
/* Stacked Gallery for desktop and sticky summary */
@media (min-width: 769px) {
.woocommerce-product-gallery {
display: none;
}
.woo-summary-wrap {
display: grid;
grid-template-columns: 60% 40%;
grid-template-rows: auto;
margin-bottom: 80px;
}
.woo-gallery-stack {
grid-column: 1;
grid-row: 1 / 3;
}
.woo-gallery-stack img {
margin-bottom: 20px;
}
.woocommerce-tabs {
grid-column: 1;
}
.woocommerce div.product div.summary {
grid-column: 2;
grid-row: 1;
margin-left: 80px;
position: -webkit-sticky;
position: sticky;
top: 105px;
bottom: 100px;
padding-right: 80px;
}
.single-product span.onsale {
position: absolute;
top: 0;
}
}
I've only just installed generatepress and want to use it.
Why is my site not?
-Alex
Can you go to Dashboard > Appearance > Elements - is there an Element titled: Gallery Stack ?
there isn't.
-Alex
Hi Alex,
When you imported the site template, did you choose import Import Demo Content as well?
https://www.screencast.com/t/KJeUdvAJuOE
If not, could you try import the template again? Let me know :)
I didn't because I don't want the demo content..
-Alex
Elements are included in the demo content unfortunately.
In that case you will need to add the elements manually as per this page:
https://gpsites.co/niche/the-single-product/
Ok,
That's not ideal.
Thanks,
-Alex
You could try starting a staging site and import Niche with demo content then just copy the elements over.
Should make it a bit easier.