How to update your current Copywrite year automatically?

It is 2021 now. Happy new year. Yeah now you are seeing your website’s Copywrite year is past. Here in my company Growthworx has the same issue.

Current year showing 2020 in 2021. Updating Copywrite year automatically.

Okay, Growthworx is a digital services agency. And at Growthworx we also develop websites with perfection for your business. We are a top website developer that can do anything you want. Sorry! I am kinda out of my topic. So let’s get back to it.

To update current year, you have to follow these steps below:

1. Login to your WordPress dashboard first.

WordPress dashboard

2. Click on Appearance and then Theme Editor. Shown in screenshot below.

Theme Editor in WordPress

3. Select your theme to edit it.

Select theme to edit

4. Then locate function.php file. And click on it.

function.php in theme editor

5. Now go to the end line of function.php

End line of function.php file

6. Add these custom code below on the end line.

function year_shortcode () {
$year = date_i18n ('Y');
return $year;
add_shortcode ('year', 'year_shortcode');

7. Now click update.

Update function.php file with new code

8. Now go back to there where you want to show current year. In my case I want to update my current Copywrite year automatically. So I will go to footer of my website and edit it.

Editing footer of a website

9. Now I will just add “[year]” without the inverted commas wherever I want to show the current year. In my case, I will replace 2020 with “[year]” without the inverted commas and save it.

Displaying 2021 in the footer of a website

As you see in the above image, my current year is changed to 2021. And it will be automatically 2022 when 2022 will come. I am sure you have also done this with me. Cheers! Congratulations. Share this with your friends who do not know this. And share your thoughts with me. Let me know if you find any issues. I will fix it for you also. I professionally find and fix 404 error & fix broken links of WordPress websites.

Happy ending! No more searching “How to update your current Copywrite year automatically?” in 2022.