In this article I show you how to change the copyright year in wordpress to update automatically. This means that when the year changes to the new year the year date will change automatically without you needing to touch it.
Making sure that the copyright date in the footer is up to date is very important as this gives a positive impression to the visitor that your website is current. I have lost count of how many times visiting a website and noticed that the copyright year is out of date.
Your Website still in Operation?
This immediately gives me an impression that their content is not as credible as other websites that I might be looking at when researching a topic, since it looks like the website owner is not updating their site.
They might have even abandoned the website. I have no way of knowing.
I am likely to move on to another website that appears up to speed. As they say first impressions last, its all about perceptions.
Configuring a Dynamic Copyright Year
It is something that seems to be elusive to a lot of people and they do it manually and often forget. However, setting up the copyright footer date to update dynamically at the start of the new year is very simple to do. There is no need for a plug-in for something that is very simple.
Too many plug-ins can undermine the performance of your website with slower loading speeds. This will turn visitors to your site away. So try and keep your plug-ins on your wordpress site to a minimum.
You can setup the copyright year date with some simple Javascript or PHP code. I know that being a software and web developer myself I might overlook the complexity that people may have whom are not programmers.
Because of this I have created a video tutorial that will walk you through how to configure. It is simply a case of copy and paste into the right place on your website.
Coding Snippets
The following code I have provided and you can simply copy and past this into your website in the footer section.
In my video above I point out that it might be the case, the code does not work when using the Java or PHP on applying it to the footer section. This could be due to limited functionality of free wordpress themes.
In the above example I used the Free Iconic One Wordpress theme, however you need the Iconic Pro Version of this theme for the code to run in the footer section.
The Iconic One Theme is highly recommended for beginners. It is the theme I used when I first started blogging. It is clean, tidy, simple to use and responsive theme offering the user a quality experience. Along with little clutter both for the Blogger and the Visitor.
In the video above, I show you have to add the code to the footer.php file inside your wordpress blog.
Back Up the Footer FIRST!!!
When working with code, mistakes can happen and just a minor error can blow up your website. Do make sure to take a copy of the footer’s original code (footer.php file) before changing it. If things go wrong and you don’t know what you did then you can just put back the original code and start again.
Javascript Code
<script type=”text/javascript”>
document.write(new Date().getFullYear());
</script>
PHP Code
<?php echo date(“Y”); ?>
Html Copyright Year Logo
©
Javascript Code Example
<script type=”text/javascript”>
document.write(“Copyright © ” + new Date().getFullYear() + ” DomainName.com – All Rights Reserved.”);
</script>
This should display as… Copyright (c) 2016 DomainName.com – All Rights Reserved.
As mentioned in the video, I recommend you stick to the Javascript code since this is run on the client-browser side after the page is loaded. The PHP is executed from the server-side therefore there will be additional processing during the loading of your page.
What this tutorial helpful for you? Feel free to let me know if you are having problems by commenting below. Also share this tutorial and the video with others whom could benefit from this.
Hi, I have started a wordpress blog using the same theme and even though I followed the exact steps from the video updating my footer.php file by inserting the given javascript code right after the footer id tag, the problem is nothing really showed up in the footer area of my homepage when I reloaded it and it is just blank!
What could be the possible problem???
Hi Pranjali,
Thank you for your comment and questions on the inserting the copyright year. Are you using the Iconic One theme and the free version? Could you paste the code in the comment below and I would be glad to help.
I can test your code from my end to see if I get the same problem you are experiencing.
Also where are you placing the code for the copyright year? Is it right after the closing footer tag (‘>’) ?
So exciting that you have started your new wordpress blog. How are you making out with it?
Thanks,
Alexander.