© {year} Jeminids
How to Use the Script:
- Paste the script by navigating to Site Settings > Custom Code. Insert it just before the closing </body> tag.
<script>
// Copyright Year Auto-Update
const currentYear = new Date().getFullYear();
$(`[data="year"]`).html(currentYear);
</script> - To specify the text that should display the current year, wrap it with a span (block the text and right click) and add the attribute data=year.
- It's a good practice to change the targeted text to something like {year} to indicate that it will be generated dynamically.