Customize your copyright and add a dynamic year

You may want to customize the copyright and still have a dynamic copyright year. You can do this with at least two methods using a little PHP (or javascript) magic!

Method 1: Using the footer block

The custom copyright input box parses PHP javascript!



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?

Spread the word!

One Response

Leave a reply

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