Only show images in “product” widget
-
Hi
I would like to show the latest products from my store on my frontpage. I use the widget “products”. And it works, but I only want it to show the picure not the price and description, is there a way to do that?Christina
The page I need help with: [log in to see the link]
-
I recommend asking at https://wordpress.org/support/plugin/woocommerce/#new-post so the plugin’s developers and support community can help you with this.
Hi
Add below CSS in your css file or Header
span.woocommerce-Price-amount.amount, span.product-title, small.woocommerce-price-suffix {
display: none !important;
}.woocommerce ul.product_list_widget li img {
float: left !important;
width: 100% !important;
}changes: https://prnt.sc/q8vfcx
Thank you
Praveen Valmiki-
This reply was modified 6 years, 4 months ago by
vpraveen60.
Thanks Praveen that worked π just, the price still shows, how do I remove that ?
And can I keep the name of the product? Show it before the image-
This reply was modified 6 years, 4 months ago by
ihdumille.
Hi
Use below
span.woocommerce-Price-amount.amount {
display: none !important;
}To keep only name remove span.product-title from used CSS
thanks that worked too, but now there is a big gab on the right
and it looks weird with the name on the right, maybe better without-
This reply was modified 6 years, 4 months ago by
ihdumille.
make the image width 100% so that right side space will fillup with image
, current its 60%okej, yes I see that now, I changed it because it looks really big π
Hi
change the site width to – max-width: 1167px;
-
This reply was modified 6 years, 4 months ago by
vpraveen60.
so where should I put this code max-width: 1167px;?
oh, I am so stupid, sorry about that.
I didn’t find the place to change the width in my theme so I’ll contact them about this
Thanks for your help
ChristinaHi Christina
if you follow the below screenshot
you can see an red arrow pointing at inspect element css -> max-width:1270px;
go to style.css file and find the max-width:1270px; at line number 610 and change it.
Thank you
Praveen-
This reply was modified 6 years, 4 months ago by
vpraveen60.
Thanks Praveen
I got this code from the theme support
.layout-site–boxed #page {
max-width: 1300px;
}And changed the 1300px to 1167 px, but that didn’t change anything to the images, only the shop got smaller.
If I change in my style .css wouldn’t I get problems at the next update? I would like to add it in my additional css box
I just realized that ALL the prices dissapeard in my shop, not only in the widget, not good at all,
is there anyway to get around that or do I have to settle with the way it looks (with the prices and a small image)?
Right now my code looks like this/**fjerner pris og tekst fra produkt widget**/ span.woocommerce-Price-amount.amount, small.woocommerce-price-suffix { display: none !important; }/**fjerner pris og tekst fra produkt widget**/
span.woocommerce-Price-amount.amount, small.woocommerce-price-suffix {
display: none !important;
}woocommerce ul.product_list_widget li img {
float: left !important;
width: 100% !important;
}
span.woocommerce-Price-amount.amount {
display: none !important;
}Hi
I was trying to check the site and assist you but I don’t find the widget part in the site.
-
This reply was modified 6 years, 4 months ago by
The topic ‘Only show images in “product” widget’ is closed to new replies.