The best way to Upload Product Badges in WooCommerce (Fast and Simple)

The best way to Upload Product Badges in WooCommerce (Fast and Simple)

Have you ever ever puzzled if you have to change WooCommerce’s fundamental sale badge with one thing extra crowd pleasing (and somewhat much less uninteresting)?

This can be a not unusual query we get from our readers, and we’re glad to let you know that the solution is sure. You completely can!

Customized product badges are an out of this world technique to spotlight particular pieces for your on-line retailer. They’re useful whether or not you need to show off new arrivals, mark pieces on sale, or draw consideration to limited-time provides.

On this put up, we’ll display you two easy tactics so as to add customized product badges on your WooCommerce retailer. You’ll both use an impressive plugin or upload some easy code.

Don’t concern. We’ll stroll you via each and every choice step-by-step!

How to Add Product Badges in WooCommerceHow to Add Product Badges in WooCommerce

Essential Word: To apply this instructional, it is important to have a completely purposeful WooCommerce retailer. In case you haven’t set yours up but (or you might be nonetheless within the procedure), take a look at our final WooCommerce information for learners.

What Are WooCommerce Product Badges?

Have you ever ever spotted the ones little ‘Sale’ or ‘New’ labels that display up on merchandise whilst buying groceries on-line?

The ones are product badges, and so they’re extremely helpful for making sure pieces stand out for your on-line retailer.

Call to mind them as digital stickers that draw your consumers’ consideration to essential product main points like gross sales, new arrivals, or limited-time provides.

We’ve observed retailer house owners use product badges in actually inventive tactics to show off particular offers, spotlight bestsellers, or mark pieces which can be working low on inventory.

Now, if you happen to’re already the use of WooCommerce, you could have spotted it comes with a fundamental sale badge function that mechanically seems whilst you scale back a product’s value.

WooCommerce's default Sale badgeWooCommerce's default Sale badge

Whilst the WooCommerce sale badge works tremendous for easy wishes, let’s be fair – it’s lovely restricted in relation to what you’ll be able to do with it.

You’ll’t simply exchange how the badge seems, upload new badge varieties, or keep an eye on precisely the place they seem to your product photographs.

In the meantime, customized product badges will let you display your emblem’s character extra. Most significantly, even though, unique badges can extra successfully draw consideration to big merchandise.

That means, you’ll be able to pressure extra gross sales for your on-line retailer. 💰

On this information, we’ll stroll you via 2 confirmed how you can upload and customise product badges in WooCommerce. Each approaches provides you with whole keep an eye on over how they appear and paintings.

You’ll use the fast hyperlinks beneath to skip on your most well-liked manner:

Means 1: Use YITH WooCommerce Badge Control (Extra Customizable)

Let’s get started with our favourite instrument for including customized product badges on your WooCommerce retailer.

We suggest the use of YITH WooCommerce Badge Control as it makes it tremendous simple so as to add and customise product badges for your on-line retailer.

Plus, we’ve examined many YITH plugins over time, like those for including subscriptions and product movies, and so they at all times paintings nice for our customers.

Wish to display a unique badge all over the vacations? Or perhaps show what quantity of money consumers will save? This plugin can do all that. You’ll even set badges to turn up at sure occasions and conceal them later.

You’ll get started with both the loose or top class model of the plugin. The loose model is very best if you happen to simply wish to upload easy textual content or symbol badges on your merchandise.

On this information, we’ll display you find out how to use the top class model, however maximum steps will paintings the similar means for each. Simply remember the fact that some cool options, like badges that mechanically display bargain quantities, best include the top class model.

Word: The top class model prices $79.99 in step with 12 months if you need all of the options. Whilst this would possibly look like so much, we expect it’s price it since you get such a lot of tactics to customise your product badges and lead them to glance precisely how you need them.

Able to start out? First, you’ll wish to acquire the plugin from YITH’s web site.

Then log in on your YITH account, move to the ‘Licenses & Downloads’ tab, and click on at the ‘Obtain Plugin’ button to obtain the document.

Downloading a YITH pluginDownloading a YITH plugin

Right here’s a tip: don’t shut this web page after downloading since you’ll want the license key that’s proven there.

Subsequent, move on your WordPress dashboard and set up the plugin. For more info, we’ve got a step by step information on find out how to set up a WordPress plugin.

When it’s energetic, you’ll see a setup display asking on your YITH e mail and license key. Simply replica those from the YITH web site and click on ‘Turn on license.’

Activating YITH licenseActivating YITH license

If you see the message announcing your license is energetic, you’re all set!

Now, click on ‘Pass to plugin dashboard,’ and you’ll be able to get started growing your first customized badge.

Going to the YITH plugin dashboardGoing to the YITH plugin dashboard

Step 1: Cover the Default WooCommerce Sale Badge

First, we wish to conceal WooCommerce’s integrated sale badge so it doesn’t conflict with our customized product badges. 

The method is actually easy. Pass on your WordPress dashboard and click on on YITH » Badge Control. Then, navigate to the ‘Basic Settings’ tab.

Right here, you’ll in finding an choice that claims ‘Cover WooCommerce “On sale” badge.’ Pass forward and switch that on.

Then, beneath ‘Cover “On sale” on:’, make a selection ‘All merchandise’ to verify the default badge doesn’t display up any place for your retailer.

Hiding WooCommerce's sale badge with YITHHiding WooCommerce's sale badge with YITH

When you’re within the settings, chances are you’ll understand every other useful choices. You’ll make a choice to cover your customized badges in sure puts, just like the sidebar or unmarried product pages.

That is nice if you wish to stay your retailer taking a look blank and arranged. For instance, in case your cellular web page feels too crowded, you’ll be able to conceal badges there, too.

Don’t put out of your mind to click on the ‘Save Choices’ button on the backside of the web page whilst you’re accomplished.

Saving settings to hide the WooCommerce sale badge in YITHSaving settings to hide the WooCommerce sale badge in YITH

Step 2: Create Your Customized Badge

Now comes the thrill section: growing your first customized product badge in WooCommerce!

Head over to the ‘Badges’ tab and click on the ‘Create Badge’ button to get began.

Creating a new product badge in YITHCreating a new product badge in YITH

The plugin offers you 4 various kinds of badges to choose between: textual content badge, symbol badge, CSS badge, or complex badge for gross sales merchandise.

Each and every kind means that you can create distinctive tactics to spotlight your merchandise. For instance, if you wish to mark merchandise as “New Arrival” or “Vegan Pleasant,” the primary 3 choices paintings nice.

However right here’s a tip: if you happen to’re growing bargain badges, we strongly suggest the use of the complex choice, which mechanically updates in response to your product’s value adjustments.

Choosing a product badge type in YITH pluginChoosing a product badge type in YITH plugin

After choosing your badge kind, give it a reputation that is helping you be mindful what it’s for.

In case you’ve selected a picture, CSS, or complex badge, you’ll see a complete number of pre-made badge designs proper within the plugin.

You’ll select whichever one you prefer. Those ready-to-use badges prevent time, and you’ll be able to nonetheless customise them to compare the manner of your WooCommerce pages.

Giving the product badge a name and choosing a badge image in YITH pluginGiving the product badge a name and choosing a badge image in YITH plugin

This plugin actually shines in its customization choices. Relying on which badge kind you picked, you’ll be able to alter all varieties of settings to make your badge glance very best to your product photographs.

Wish to exchange the colour? Simple.

Want to alter how clear it’s? No drawback.

You’ll even rotate the badge or transfer it round to your merchandise till it’s in simply the best spot.

Customizing the YITH product badgeCustomizing the YITH product badge

For our instance, we made the badge actually pop through converting its shade to purple and putting it within the best proper nook of the product symbol.

Those small tweaks could make a large distinction in how successfully your badges get other folks’s consideration.

While you’re pleased with how the entirety seems, simply click on ‘Save badge’ to complete up.

Saving the changes made to the YITH product badgeSaving the changes made to the YITH product badge

Step 3: Create a Rule to Show Your Badge

Now that we’ve created our customized badge, let’s inform WooCommerce precisely the place and when to turn it.

Head over to the ‘Badge Laws’ tab and click on ‘Set Rule.’

Creating a new product badge rule in YITHCreating a new product badge rule in YITH

Call to mind regulations as directions that inform your badges when to seem to your product photographs.

The plugin offers you 4 primary tactics to keep an eye on the place your badges display up: merchandise badge, class badge, tag badge, and delivery magnificence badge.

YITH's product badge rule typesYITH's product badge rule types

You’ll make a choice the ‘Merchandise badge’ rule so as to add badges to sure pieces or the ‘Class badge’ rule to hide complete product classes.

In the meantime, the tag badge rule displays badges on merchandise sharing the similar WooCommerce tag, and the delivery magnificence badge rule shows badges in response to delivery choices.

Each and every rule objectives other product facets, however all of them paintings in a similar fashion. So, you simply wish to select what works very best on your wishes.

Let’s use the goods badge rule for this case because it’s the most typical selection.

Subsequent, give your rule a simple identify so you’ll be able to in finding it simply later.

Then, search for the ‘Display badge in:’ environment. That is the place making a decision which merchandise get your badge. You’ll make a choice to turn it on all merchandise, contemporary additions, pieces on sale, featured well-liked merchandise, and even simply merchandise which can be in inventory.

Choosing what type of products the badge should appear in using YITHChoosing what type of products the badge should appear in using YITH

Let’s say you’re making a rule on the market pieces. If you choose ‘On sale merchandise,’ then your badge will mechanically seem every time you mark a product as being on sale. It’s that straightforward!

However some choices include extra settings so that you can configure. For instance, if you happen to select ‘Handiest contemporary Merchandise,’ you’ll be able to set badges to seem on pieces added inside of the previous few days (like 7, 14, or 30 days).

This makes it tremendous simple to mechanically spotlight new arrivals for your retailer with out manually including badges to each and every product.

Creating a badge rule for new products with YITHCreating a badge rule for new products with YITH

Once in a while, chances are you’ll wish to stay sure merchandise badge-free. That’s the place the ‘Exclude merchandise’ environment turns out to be useful.

Simply allow this environment and kind within the names of any merchandise you don’t wish to display the badge for. These things will keep badge-free even though they fit your different regulations.

Excluding products for the badge to appear in with YITHExcluding products for the badge to appear in with YITH

Subsequent, make a selection which badge design you need to make use of within the ‘Badge to assign’ dropdown.

Now, right here’s the place it will get actually versatile. You’ll agenda when your badges seem and make a choice who will get to peer them.

Choosing a badge to use for the badge rule in YITHChoosing a badge to use for the badge rule in YITH

The ‘Agenda rule’ choice is very best for limited-time offers.

While you allow it, the plugin will ask you to set get started and finish dates on your badges.

Creating a schedule for the product badge to appear with YITHCreating a schedule for the product badge to appear with YITH

And if you wish to display particular badges to sure consumers, like exhibiting a “VIP Bargain” badge best to probably the most dependable consumers, you’ll be able to do this, too.

To do that, simply make a selection ‘Handiest explicit customers or person roles’ within the ‘Display badge to’ environment. Then, kind for your most well-liked person roles or particular person usernames beneath it.

When the entirety seems proper, simply click on ‘Save Rule,’ and also you’re all set!

Creating a user role rule for the product badge with YITHCreating a user role rule for the product badge with YITH

Be happy to talk over with your retailer’s entrance finish to peer your new product badges in motion.

In case you’re the use of the complex badge kind on the market pieces, you’ll see it exhibiting each the bargain proportion and the real cash stored, serving to consumers temporarily spot the most productive offers.

Example of YITH Badge Management's product badgeExample of YITH Badge Management's product badge

💡 Similar Put up: Searching for extra cool equipment and techniques to support your WooCommerce retailer? Take a look at our checklist of the most productive WooCommerce plugins.

Means 2: Use Customized Code (Unfastened and Easy)

In case you don’t want the complex choices from the primary manner, or if you happen to’re in search of an absolutely loose choice, then we’ve got a easy code manner that gained’t value you the rest.

And if you happen to’re now not pleased with code, don’t concern! We’ll be the use of the WPCode plugin to make this tremendous simple and secure. It permits you to upload customized code snippets in WordPress with out being a developer or risking breaking your web site.

We’ll use the loose model of WPCode for this instructional as a result of it really works completely for our wishes. That stated, there’s a top class model with cool options like AI code technology and trying out mode.

For more info, simply take a look at our in-depth WPCode evaluation.

First, you wish to have to put in the WordPress plugin for your admin space.

Then, move to Code Snippets » + Upload Snippet. Hover over the ‘Upload Your Customized Code (New Snippet)’ segment after which click on at the ‘+ Upload Customized Snippet’ button.

Adding a new custom code snippet in WPCodeAdding a new custom code snippet in WPCode

Subsequent, make a choice ‘PHP Snippet’ when requested in regards to the code kind.

This tells WordPress what form of code we’re the use of.

Choosing PHP snippet in WPCodeChoosing PHP snippet in WPCode

Now, you need to give your snippet a reputation that is helping you be mindful what it does.

Since this code will take away the default WooCommerce sale badge and upload each new product badges and dynamic bargain badges, chances are you’ll name it one thing like “Customized WooCommerce Badges.”

As soon as that’s accomplished, paste the code snippet we’ve equipped beneath within the ‘Code Preview’ field.

This code does one thing actually cool. It mechanically calculates bargain percentages and displays them at the gross sales badge. Plus, it provides a “New” badge to merchandise added within the final 7 days.

// Take away default WooCommerce sale flash badge
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );

// Upload customized badges to merchandise
add_action( 'woocommerce_before_shop_loop_item_title', 'add_custom_product_badges', 10 );
serve as add_custom_product_badges() {
    international $product;

    // Initialize a variable to trace whether or not a badge has been displayed
    $badge_displayed = false;

    // For merchandise with any quantity of bargain proportion (1% or extra)
    if ( $product->is_on_sale() ) {
        // Get common and sale costs
        $regular_price = floatval( $product->get_regular_price() );
        $sale_price    = floatval( $product->get_sale_price() );

        // Take care of variable merchandise
        if ( $product->is_type('variable') ) {
            // Get variation costs
            $regular_price = floatval( $product->get_variation_regular_price( 'max', true ) );
            $sale_price    = floatval( $product->get_variation_sale_price( 'min', true ) );
        }

        // Calculate bargain proportion if common value is legitimate
        if ( $regular_price > 0 ) {
            $discount_percentage = ( ( $regular_price - $sale_price ) / $regular_price ) * 100;

            // Show badge if bargain is 1% or extra
            if ( $discount_percentage >= 1 ) {
                echo '' . spherical( $discount_percentage ) . '% off!';
                $badge_displayed = true; // Badge has been displayed
            }
        }
    }

    // Handiest display the "New" badge if no different badge has been displayed
    if ( ! $badge_displayed ) {
        // For "New" merchandise added within the final 7 days
        $post_date  = get_the_time( 'Y-m-d', $product->get_id() );
        $post_stamp = strtotime( $post_date );
        $newness    = 7; // Collection of days the product is regarded as new

        // Test if the product is new
        if ( ( time() - ( 60 * 60 * 24 * $newness ) ) New';
            $badge_displayed = true;
        }
    }
}

Wish to alter how lengthy a product is regarded as “new”? Simply search for the road the place it says $newness = 7 within the code. You’ll exchange that quantity 7 to then again many days you need, like 14 for 2 weeks or 30 for a month.

To complete up, click on the ‘Inactive’ button till it adjustments to ‘Lively,’ then hit ‘Save Snippet.’

WPCode custom snippet for displaying WooCommerce product badgesWPCode custom snippet for displaying WooCommerce product badges

Subsequent, we wish to taste our badges to lead them to glance nice to your merchandise. Let’s upload some CSS to regulate their look.

So as to add a brand new snippet, apply the similar steps as ahead of, however this time, make a choice ‘CSS Snippet’ when requested.

Selecting CSS Snippet as the Code TypeSelecting CSS Snippet as the Code Type

Title your snippet one thing descriptive, like “Product Badge Types.” This will likely permit you to in finding it simply if you wish to have to make adjustments later.

Right here’s the CSS code that can make your badges glance skilled. Simply paste this into the ‘Code Preview’ field:

/* Commonplace kinds for all product badges */
.product-badge {
    place: absolute;
    best: -10px;      /* Place on the best edge */
    proper: -10px;    /* Place on the proper edge */
    padding: 12px 16px;
    border-radius: 50%;
    shade: #ffffff;
    font-size: 16px;
    font-weight: daring;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Types for the "New" badge */
.new-product {
    background-color: #4CAF50; /* Inexperienced background */
}

/* Types for the "Sale" badge */
.sale-product {
    background-color: #FF0000; /* Purple background */
}

Let’s damage down what you’ll be able to customise on this code.

Need your badges in a distinct spot? To do that, you’ll be able to exchange the best and proper values. For instance, converting best: -10px to best: 10px will transfer the badge down.

Don’t like the colours? It’s tremendous simple to switch them. Simply in finding the background-color traces and change the colour codes.

For example, if you need a blue sale badge as a substitute of a purple one, exchange #FF0000 to #0000FF. You’ll additionally make the badges larger or smaller through adjusting the font-size worth.

Wish to be informed extra about tweaking those kinds? Take a look at our beginner-friendly information on CSS in WordPress.

If you’re accomplished, simply click on the ‘Inactive’ button to make it ‘Lively,’ then hit ‘Save Snippet.’

WPCode custom snippet for styling product badgesWPCode custom snippet for styling product badges

That’s it!

Your badges will have to now seem to your product photographs. Right here’s an instance of what ours looks as if the use of our CSS code:

Example of WooCommerce product badges made with WPCodeExample of WooCommerce product badges made with WPCode

Uncover Extra WooCommerce Guidelines and Tips

Now that you know the way to show product badges in WooCommerce, chances are you’ll wish to discover different ways to support your on-line retailer. Listed here are some useful guides we propose:

We are hoping this newsletter has helped you learn to upload product badges in WooCommerce. You may additionally need to try our professional alternatives of the most productive WooCommerce product grid plugins and our information on find out how to accelerate WooCommerce efficiency.

In case you preferred this newsletter, then please subscribe to our YouTube Channel for WordPress video tutorials. You’ll additionally in finding us on Twitter and Fb.

WPBeginner Highlight 27: WordPress 7.1, WPVibe AI All over, and a New Option to Report Your Display
WPBeginner Highlight 27: WordPress 7.1, WPVibe AI All over, and a New Option to Report Your Display by in Blog

August used to be a large month for WordPress. WordPress 7 ...

01 Sep, 2026 7  Person Liked it

WordPress.com Changelog: A New Web hosting Dashboard, a ChatGPT Plugin, and WordPress 7.1
WordPress.com Changelog: A New Web hosting Dashboard, a ChatGPT Plugin, and WordPress 7.1 by in Blog

August 14 – 27, 2026 Welcome again to the WordPr ...

30 Aug, 2026 7  Person Liked it

Your WordPress.com Website Now Works from Within ChatGPT
Your WordPress.com Website Now Works from Within ChatGPT by in Blog

You'll now set up your WordPress.com web page from Ch ...

27 Aug, 2026 6  Person Liked it

Offer Ends Tonight 12 PM

Lifetime Membership with Unlimited Access