Site logo

Archived topic

Hide WooCommerce Category Short Description generated by shortcode on Front Page

4 replies · Started by Ian on October 22, 2018

Viewing posts 1–5 of 5

Hi
I hope you can help me.
I am displaying WooCommerce category thumbnails in columns on my frontpage for navigation purposes - i.e. click the image and you go to that category in the shop.

WooCommerce provides the products shortcode which also handles display of category thumbnails.
I have mine set up as [product_categories number="0" parent="0" columns="3"] which gives me three columns of thumbnails attached to each category which is a parent category.

The problem is the short description for the category also shows up which is not desirable. I am not very good with CSS but see the shortcode is class .woocommerce-product-details__short-description which sits under class .product-categry product

I am not quite sure how to focus css on that element - maybe
.product-category product .woocommerce-product-details__short-description but in any case if I display:none that class then it will likely remove the short description on the single product pages and archive pages where where I want them showing.

Is is possible to remove the category short description on teh homepage leaving just the clickable thumbnail by css without affecting the rest of the places it appears - a function maybe?

Hi there,

Maybe try something like this:

.home .product-category product .woocommerce-product-details__short-description {
    display: none;
}

Let me know :)

Hey Leo

Added that to the Additional CSS in the Customizer and Published - sadly no effect.

Awesome customer service response time though - very much appreciated!!

But

.home .woocommerce-product-details__short-description {
    display: none;
}

that works

Ok glad you figured out.

I could only guess as the link you provided wasn't working :)

This archived topic is closed to new replies.