Following up on our
Website Resolutions post from a few days ago, we have another resolution, update your footer copyright message to the current year. I was looking at a friend's website yesterday, he's in the financial services business, and the footer copyright still had 2013. Would you take advice from 3 years ago?
So go and update your footer. There are the quick and easy ways, manual, guaranteeing you will forget sometime in the future. Then there are programming solutions that will take care of it once and forever. Choose the right one for your website.
Manual Update
The quickest way, for right now, is just to go in and make a manual edit. If you are using WordPress, your theme likely has an option for this, either a footer widget, or a copyright field under Appearance. Just change 2015 to 2016 and save the change. Then set reminders in your calendar to go and do it again at the stroke of midnight every New Year's Eve. Got something better to do on New Year's Eve? Then we suggest you see the suggestions below to add a little website programming to auto update the year.
PHP Method
Many websites are built using the PHP website programming language. If you purchased the code for the site layout, then likely you have a footer function or a template that contain the header, navigation, and footer for your site. Simply add this code to the footer section in template or function to replace the hard coded copyright date:
Copyright © <?php echo date('Y'); ?> Your Company Name
If you only want to replace the year, just put this: <?php echo date("Y"); ?> where 2015 currently is.
If you are using WordPress, you can usually find the copyright notice in the footer.php file.
PHP is a server side scripting language so the date is going to be based on the location of the server. It is possible to adjust the date formatting to allow for your timezone, but that is more complicated than we care to cover in this post.
JavaScript Method
Similar to using the PHP code above, copy and paste this code to where you want the copyright notice, along with the date automatically updating.
Copyright ©<script type="text/javascript">document.write(new Date().getFullYear());</script> Your Company Name
JavaScript is a client side scripting language so the date is going to be based on the location of the user, and the date setting on their device..