How to Display a Random Encouragement Message in Webflow
Learn how to display a random encouragement message with automatic rotation in Webflow.
In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to display a random encouragement message when the page loads in Webflow, with automatic rotation.
Example
1. Create the container in Webflow
Create a Div with the ID encouragement-msg wherever you want it: 404 page, loading page, article header, footer... The script injects the message and emoji directly.
2. Customize the messages
Update the messages array with your own quotes, brand values, tips, or welcome messages. Each object has two properties: text (the quote) and emoji (the icon).
3. Add the script in Footer code
Conclusion
A random encouragement message adds personality to your website. Use cases:
- 404 pages to soften the error
- Dashboard or member area pages
- Loading or maintenance screens
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.















