Now that we’ve created our custom badge, let’s tell WooCommerce exactly where and when to display it.
Go to the “Badge Rules” tab and click “Set Rule”.
Creating a new product badge rule in YITH
Think of rules as instructions that tell your badges when they should appear on product images.
The plugin offers four main ways to control where your badges are displayed: product badge, category badge, tag badge, and shipping class badge.
YITH's product badge rule types
You can choose the “Product Badge” rule to add badges to specific items or the “Category Badge” rule to cover all product categories.
Meanwhile, the tag badge rule shows badges on products that share the same WooCommerce tag , and the shipping class badge rule displays badges based on shipping options.
Each rule targets different aspects of the product, but they all work in a similar way. So you just need to choose the one that works best for your needs.
We'll use the product badge rule for this example, as it's the most common option.
Then give your rule a simple name so you can easily find it later.
Next, look for the “Show badge in:” setting. This is where you decide which products will receive your badge. You can choose to show it on all products, recently added products, sale items, popular featured products, or even just products that are in stock.
Choosing what type of products the badge should appear in using YITH
Let’s say you’re creating a rule for sale items. If you select “Sale Products,” your badge will automatically appear whenever you mark a product as on sale. It’s that simple!
But some options come with more settings for you to configure. For example, if you choose “Only recent Products,” you can set badges to appear on items added within the last few days (such as 7, 14, or 30 days).
This makes it super easy to automatically highlight newly arrived products in your store without manually adding badges to each product.
Creating a badge rule for new products with YITH
Sometimes you may want to keep certain products unbadged. That’s where the “Exclude Products” setting comes in handy.
Simply enable this setting and enter the names of the products you don't want to display the badge for. These items will remain unbadged, even if they match your other rules.
Excluding products for the badge to appear in with YITH
Then select the badge design you want physician database to use from the “Badge to assign” dropdown menu.
Now, this is where it gets really flexible. You can schedule when your badges will be displayed and choose who can see them.
Choosing a badge to use for the badge rule in YITH
The “Schedule rule” option is perfect for limited-time offers.
When you activate it, the plugin will ask you to set the start and end dates for your badges.
Creating a schedule for the product badge to appear with YITH
And if you want to display special badges to certain customers, like displaying a “VIP Discount” badge only to your most loyal customers , you can do that too.
To do this, simply select “Only specific users or user roles” in the “Show badge to” setting. Then, type your preferred user roles or individual usernames below it.
Create a rule to display your badge
-
- Posts: 73
- Joined: Thu Dec 26, 2024 5:27 am