Replace WooCommerce category images with plain text.

Jun 7, 2022 | WooCommerce Tips | 0 comments

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.
Replace WooCommerce category images with plain text
Add the CSS below to hide the category image and style how you want the category names appear.
[css]
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;
}
[/css]

Need help with this?
Hire me for a consultation and I'll walk you thru the process.

0 Comments

Submit a Comment

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

5 star reviews
"WOW! Money WELL spent. Joseph was incredibly knowledgeable in helping me make some final tweeks to my Divi website. He was very caring and went above and beyond. Will 100% use him for any future Divi website needs."
Claire - CMMC

5 star reviews
"You really get what you pay for with Joe. He does more than simply build a website, he sets up websites for success. Functional, clean, professional designs and he keeps up/implements the latest plugins and technology. Thank you Joe. I will continue to refer you work."
Mark Winger

5 star reviews
"The best WordPress guy I’ve worked with on WordPress, hands-down (and I’ve worked with dozens). Remarkably good with theme customizations with a quick turn. Kept it on budget as well. A rarity with hourly contracts."
Nate Wright

5 star reviews
"Thanks for your prompt reply. You’re always so comprehensive. If we could write another review just for your communication skills, then we would."
Alex N

More Tips

Looking for some deals?

Ad - Web Hosting from SiteGround - Crafted for easy site management. Click to learn more.

Cloudways Hosting

WPEngine Hosting

Pressable Hosting

AccuWeb Hosting

Divi PHP Code Module

Ask a Question

"*" indicates required fields