Documentation › Adding a Custom Copyright with a Dynamic Year

Adding a Custom Copyright with a Dynamic Year

If you customize the footer block with your own custom copyright, you lost the dynamically updated year; so what should you do if you need a customized copyright but you also want that year to be updated automatically? You have at least two methods that will work!

Method 1: Footer Block

In the custom copyright

In that box, you could input the following code, which uses PHP to display the year dynamically:

Or this, which uses javascript to display the year dynamically:

Both end up with the following displaying:

© Headway Themes 2015. All Rights Reserved.

So for PHP the important part is the <?php echo date('Y');?> Put that wherever you want the year to display.

Similarly, the important part if you want to use JavaScript is the

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

Method 2: Use a custom code block

But you can use the same code as above.  Easy, right?

This article was last updated for Headway version 3.8.3

Copyright © 2016 Vesped Inc. All Rights Reserved. Proudly Powered by Headway and WordPress