Skip to main content
All CollectionsFAQCMS
How to Display a "NEW" Badge on CMS Items During a Specified Period
How to Display a "NEW" Badge on CMS Items During a Specified Period

You can display specific elements based on CMS items' publication dates for a set duration.

Saika avatar
Written by Saika
Updated this week

How to Display Elements During a Specific Period

Using the "from ~ , days/weeks/months/years" display condition based on the CMS "Publication Date" property, you can show elements for specific periods.

Use Cases

  • Display a "NEW" badge on blog posts published within the last week

  • Show a badge on limited-time price items for 3 days

  • Display a "Recommended" mark on campaign products for one month

This article will guide you through displaying a "NEW" badge on both article detail pages and article lists, but only for posts published within the last week.

Screenshot: Showing a "NEW" badge on CMS items during the specified period.

Tips: Currently, publication date is the only property that supports date-based display conditions. To show elements for a specific period from a particular date, you'll need to edit the publication date.

Setup Instructions

Prerequisites

Please refer to these articles to create your article detail pages and article lists beforehand:

Step 1. Adding the "NEW" Badge

Place the "NEW" badge on your article detail page or article list:

  1. Drag and drop a text box from the left add panel

  2. Type "NEW"

  3. Adjust styling (font size, color, background color) using the settings panel

Screenshot: Placing a "NEW" badge on the CMS list

Step 2. Setting Display Conditions

  1. Select the "NEW" badge

  2. Open the right settings panel and click [Set Display Conditions]

  3. Configure display conditions: Select [Publication Date] from properties and set the period to [Week]

Placing a "NEW" badge on the CMS list

Step 3. Testing

Use Live Preview to confirm the "NEW" badge appears only on items within the specified period from their publication date.

Screenshot: Verifying functionality in Live Preview

You can modify article publication dates in the CMS dashboard as needed for testing.

Live Preview: Editing an item's publication date and time

Once you've confirmed the CMS items are "Published" and everything works correctly, publish or update your site to reflect changes on the live site.

Screenshot: Updating the site
Did this answer your question?