How to Dynamically Display the Current Year in Hostinger Website Builder
Keeping your website’s footer up to date with the current year is essential for maintaining a professional appearance. If you’re using Hostinger Website Builder, you can dynamically display the current year so that it updates automatically without requiring manual edits. In this tutorial, I’ll guide you through the simple process of making your website’s year update dynamically.
Why Dynamically Display the Current Year?
Many website owners set a static year in the footer, which requires manual updates each year. Forgetting to update it can make your website look outdated. Using a small piece of code, you can ensure that your website always displays the correct year without needing to remember to change it annually.
Steps to Dynamically Display the Current Year in Hostinger Website Builder
Follow these simple steps to implement a dynamic current year in your Hostinger Website Builder site:
1. Log in to Your Hostinger Account
- Go to Hostinger’s website and sign in to your account.
2. Access Your Website’s Editor
- Click on Websites in your dashboard.
- Locate your website from the list and click Edit Website.
3. Navigate to Your Footer Section
- Scroll down to the footer section where the current year is displayed.
- If you see a static year, delete it.
4. Add an Embed Code Element
- Click on Add Element.
- Scroll down and select Embed Code.
- Insert the Embed Code element into your footer.
5. Enter the Code
Click on the Embed Code box and replace the default code with the following:
<span style="color: white;">
© <script type="text/javascript">document.write(new Date().getFullYear());</script>. All rights reserved.
</span>
6. Save and Publish
- Click Save or Update to apply changes.
- View your website live and scroll down to confirm the current year is displaying correctly.
Benefits of Using This Method
Automatic Updates – No need to manually change the year every January.
Professional Appearance – Keep your website looking fresh and up to date.
Easy to Implement – Requires no advanced coding skills.
Additional Resources
If you want to learn more about customizing your website with Hostinger Website Builder, check out my free course. It covers:
- Website setup and design
- Content management
- SEO optimization
- E-commerce integration
- Custom code implementation
Get My Hostinger Course for Free: https://university.bensexperience.com
Join my University (Free): https://university.bensexperience.com
By following these steps, you’ll ensure that your website footer always displays the correct year automatically. If you have any questions, feel free to leave a comment below!