Scroll Top

Dynamic Year/Date HTML

2

Dynamic Year/Date HTML

Depending on the website, it may be compatible with a simple javascript to dynamically show the year. Very useful for copyright.

<script>document.write( new Date().getFullYear() );</script>

I’ll use this for quick copyright template:

<p>Copyright &copy; <script>document.write(new Date().getFullYear())</script> Your Name All Rights Reserved</p>

If you are working with the theme, the7, it comes with a nice shortcode that does it for you [dt-year]

Dynamic Year/Date HTML