Pricing Process Reviews Contact

Divi Guy blog

Replace WooCommerce category images with plain text.

Sometimes it’s a pain to make images for all your WooCommerce product categories. Otherwise, you get the ugly default image. For example, see the image below where each category displays text only with a blue background.

Add the CSS below to hide the category image and style how you want the category names appear.

li.product-category a {
    padding-top:15px;
    padding-bottom:15px;
}
li.product-category {
    background-color:#002b91;
    width:265px;
    height:130px;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}
li.product-category:hover {
    background-color:#1160d9;
    -moz-transition: all 0.2s; -webkit-transition: all 0.2s; transition: all 0.2s;
}
h2.woocommerce-loop-category__title {
    padding-left:10px !important;
    padding-right:10px !important;
    text-align:center;
    color:#fff;
    font-size:25px !important;
    line-height:35px;
}

Need a hand?

Need help with your Divi website?

Book a Divi consultation and we can fix it together over Zoom, or ask for an estimate for bigger jobs.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Search

Browse

More tips

Got a question?

Ask me anything

Stuck on something in Divi or WordPress? Ask away and I will reply by email, usually within 24 hours.

Ask a Question

Tell me about your project. The more details the better.

"*" indicates required fields

Make a payment

Got an invoice?

Pay an invoice, a deposit or a tip in about a minute. Card or PayPal, secure checkout, and I never see your card number.

Make a payment