Wix Functions: Adding an Event Badge
3 min
In this article
- Adding a 'number of tickets left' badge
- Adding a custom text badge
Add event badges based on your event data to highlight urgency, promotions, or featured picks. For example, show the number of tickets left for limited ticket events or label a headline show with a short promotional message. Once you set up and activate an event badge function, it automatically reviews each event and outputs a single badge when your conditions are met. The badge appears on your event lists and event pages and follows your site design.
The current event badge templates include a number of tickets left badge and a custom text badge. This article gives you step by step instructions for setting up each template. You can also create a function from scratch and add your own custom logic.
Adding a 'number of tickets left' badge
Display how many tickets are still available for your events. This is useful when there are a limited number of tickets to your event and you want guests to register quickly.
To add a 'number of tickets left' badge:
- Go to Functions in your site's dashboard.
- In the Function catalog, click Create Function under Add event badges.
- Select # of tickets left badge and click Use Template.
- (Optional) To select which events the badge will appear on, click the More Actions icon
at the top right and select Function configuration.
Note: If you don't select a specific event, the badge will appear on all events. - Click the first Variable step to update its logic.
- Click 'Number value' to update the value to match your business needs (e.g., update the default product value to match the number of tickets for your event).
- Click Apply to save the variable.

- Click the second Variable step to update its logic.
- Click 'Value' to update the value to match your business needs (e.g., update the default product value to match the number of tickets left for your event).
- Click Apply to save the variable.

- Click the Output step.
- Set the priority so that the highest priority badge that meets your criteria will be displayed.
- Click Apply to save the output.
- Click Activate at the top right once your function is set as desired.

Adding a custom text badge
Display any text you want on a badge for your events. These can display a fixed message like Featured, Top Pick, or Selling Fast. They're great for highlighting specific events regardless of ticket count.
To add a custom text badge:
- Go to Functions in your site's dashboard.
- In the Function catalog, click Create Function under Add event badges.
- Select Custom text badge and click Use Template.
- (Optional) To select which events the badge will appear on, click the More Actions icon
at the top right and select Function configuration.
Note: If you don't select a specific event, the badge will appear on all events. - Click the output step to update its logic.
- Click 'Text' to update the value to match your business needs (e.g., update the default product value to match the name and need of the badge).
- Set the priority so that the highest priority badge that meets your criteria will be displayed.
- (Optional) Continue building your function as needed.
