How Product Labels Work

Advanced product labels are made of two parts: Label conditions and Label settings. For each product, if the Label conditions are met, then the Label settings are used.

Add An Advanced Product Label

To add an advanced product label login to the WordPress dashboard.

1. Navigate to Downloads, then click on Settings. Next click on the Extensions tab.

You will see the Advanced Product Labels section. The Product Labels meta box will list any defined product labels.

2. Press Add Product Label.

3. Add a title for the label. This is only used internally and not shown on the front end of the site.

4. Add Label conditions

Label conditions are conditions that must be met for the label to display for a product. The conditions are tests that are created in the form of “product attribute”, “logical operator”, followed by “value”.

There are seven product attributes that can be used in the condition:

  • Product
  • Product category
  • Bestsellers
  • Product age
  • Price
  • Tag
  • Total sales

There are four logical operators that can be used in conditions:

  • Equal to
  • Not equal to
  • Greater or equal to
  • Less or equal to

The type of value depends on the product attribute you are testing.

For  Product the value field will show a list of EDD download products defined on the site.

For Product Category the value field will show a list of EDD categories defined on the site.

For  Bestsellers the value field takes a number of best sellers to apply the label to.

For  Product age the value field takes a number of days since the product was created.

For  Price the value field takes a number to be compared to the product’s price. This example will match products with a Price of $25.00.

For  Tag the value field will show a list of EDD tags defined on the site.

For  Total Sales the value field takes a number to be compared to the product’s total sales. This example will match products with Total Sales over $500.

The conditions act like a logical equation. Rules added in the same group box will be joined by an AND. Multiple group boxes can be added and will be joined together by an OR logical operator.

The following example will apply the advanced label to products matching the condition:

If the product is in category “E-Books” and has a price over $25.00, or if the product is the Pro Subscription, then add the label.

5. Add Label settings

Advanced labels have five available settings:

  • Label type
  • Label text
  • Label color
  • Label align

Label type can be either Badge, Flash, or a Ribbon.

This is an example of a Badge:

This is an example of a Flash:

This is an example of a Ribbon:

Label text can be any free form text. Example: “Sale!”, “Bestseller”, “E-book”.

Label color can be set to Red, Blue, Green, Yellow, Orange, Grey, Black, White, or set to a custom hex color. Here is the hex chooser for the label background and text color:

Label align can be set to None, Left, Right, or Center.

6. Publish the Advanced label and it will be visible on the front end of your store!

Edit An Advanced Product Label

To edit an advanced product label, from the Extensions tab, click on the name of the label to be edited and you will be taken to the Edit Product Label page. Make changes then press the Update button.

Delete An Advanced Product Label

To delete an advanced product label, from the Extensions tab, hover over the name of the label to be deleted. “Edit” and “Delete” links will appear. Press the “Delete” link.

FAQ

Where do the advanced labels show on my site?
 The advanced labels will show on the archive or category view where products are displayed in a grid.

Will this work with my existing theme?
The labels will work with about any theme and colors can be modified to match. Do note that the positioning of the buttons may need some adjusting depending on the theme.

Can multiple labels be applied to one product?
Only one Flash or Ribbon can be on a product at one time, but multiple Badges can be added to products.

Are labels displayed on the product detail pages?
Not by default, we’ve got a small code snippet that you can put in your (child) themes functions.php via FTP that will enable it.