5 Star Plugins
  • Home
  • Products
    • Cloudflare Plugin Coming Soon
    • Dynamic Copyright Year
    • Easy Age Verify
    • Marijuana Age Verify
    • Featured Images in RSS
    • FreeScout GPT Pro
    • FreeScout Plus iOS App
    • Help Scout For Blesta
    • Pretty Simple Popup Builder
  • Support
    • Support Center
    • Knowledge Base
    • RSS Image Checker
    • Affiliate Program
    • Rate Our Plugins
  • Customer Login
  • Blog
Download Free
✕
  • Home
  • Products
    • Cloudflare Plugin Coming Soon
    • Dynamic Copyright Year
    • Easy Age Verify
    • Marijuana Age Verify
    • Featured Images in RSS
    • FreeScout GPT Pro
    • FreeScout Plus iOS App
    • Help Scout For Blesta
    • Pretty Simple Popup Builder
  • Support
    • Support Center
    • Knowledge Base
    • RSS Image Checker
    • Affiliate Program
    • Rate Our Plugins
  • Customer Login
  • Blog

How To Add A Dynamic Copyright Year To The WordPress Footer

December 19, 2022
Categories
  • Dynamic Copyright Year
  • Tips
Tags

A dynamic copyright year can be added to the WordPress footer by implementing a code snippet or shortcode, or without coding using the free Dynamic Copyright Year plugin.

Summary of methods to automate a WordPress footer copyright year:

  1. Add JavaScript or PHP code to the site’s code.
  2. Add a shortcode to the site’s footer.
  3. Avoid coding and install Dynamic Copyright Year plugin.

The changing of the New Year means website footers everywhere need updating. Have you ever visited a site with a copyright stuck in last decade? It makes you wonder if they are still in business. Or if you can trust they keep any information on their website current. Keeping the footer year up-to-date protects your copyright and it’s a good look.

I have a New Year’s resolution. Never edit my website footer on New Year’s Day again. Our new plugin dynamically updates the footer in WordPress, no coding or site edits required. Dynamic Copyright Year detects an existing old copyright year, and changes it to the current year based on the visitor’s location.

Here’s a snapshot of ways to automate your copyright year and how easy it is to use our plugin.

Method 1: WordPress Copyright Footer Code

Add JavaScript, HTML, PHP code to the site’s code.

Difficulty: Medium to High (particularly with hardcoded or complex themes)

This method requires code-level edits, or at least adding HTML code, to the footer of WordPress. This can be daunting for most users and take time to figure out. Editing the footer CSS code could break how the site functions and displays. Easy-peasy for a developer. Not so much for the rest of us.

There are code-snippets available from a quick search. Be sure the type of code used whether it is JavaScript or PHP is compatible with your site, theme, and placement (element or widget).

Here’s an example of how to add JavaScript WordPress copyright footer code:

Login to WordPress and copy this snippet into your header (via a header/footer plugin or a code snippets plugin):

<script>
document.getElementById(“year”).innerHTML = new Date().getFullYear();
</script>

Then, in the footer of your site where you want the copyright year to appear, add this HTML:

© <span id=”year”></span>

Refresh your cache and browser, then do a lot of testing to make sure it worked and displays properly. Since it will be impossible to know if it changes to next year, the real test will be returning to your site January 1st to confirm the year turned over.

Method 2: WordPress Copyright Year Shortcode

Add shortcode to the site’s footer.

Difficulty: Easy to High (particularly with hardcoded footers)

Using shortcodes are an easy way to do all kinds of things on a website. A shortcode is a small piece of code in [brackets] that performs a feature or function on your website. You may have used it before on a form, gallery or button. It is somewhat of a placeholder or “insert here” call out that is identified by the Theme, a plugin or other coding which inserts the thing. In this case the thing is the current year.

To start using a copyright year shortcode you must first add code to your theme’s functions.php file or a code snippets plugin:

function copyrightyear_shortcode () {
$year = date_i18n (‘Y’);
return $year;
}
add_shortcode (‘copyright-year’, ‘copyrightyear_shortcode’);

Then add the specific shortcode to your where ever you’d like it to display, usually done in a footer widget.

[copyright-year]

Refresh your cache and browser, then do a lot of testing to make sure it worked and displays properly. Since it will be impossible to know if it changes to next year, the real test will be returning to your site January 1st to confirm the year turned over.

NOTE: Prior to 2021 WordPress widgets did not support shortcodes. The current version of WordPress now allows shortcodes in widgets (and in the body content) by default. If you run an old version of WordPress, using shortcodes will require additional steps. It’s important to keep your site updated with the current version of WordPress for security fixes that protect your site from malware and attacks. Plus, you miss out on improvements like this one.

Method 3: Avoid coding

Install the free Dynamic Copyright Year plugin.

Difficulty: Easy (no coding required)

Dynamic Copyright Year is a free plugin that automatically works, no coding or shortcode required.

This plugin detects the existing copyright year and dynamically updates it to the current year based on the visitor’s timezone. Visitors around the globe will see the year in their timezone at midnight.

It was designed to work on hardcoded Themes and hard-to-edit footers. The plugin detects copyright year text in your existing footer, then updates it to the current year. It even works on sockets and widgets. You won’t have to hire an expensive developer to figure out the site.

Here’s how to dynamically update a footer year without coding.

Step 1
Install Dynamic Copyright Year plugin and turn on automatic year updates.
If “© YYYY” or “Copyright YYYY” text exists in your footer, you are ready to go.

Step 2
Test it right now.
Refresh your site to view the footer change from a past to the current year.

Step 3
Create footer policy links.
Use Premium options to add text links next to the copyright, and receive premium email support if you run into any issues.

Install the free copyright year plugin from WordPress.org to display the new year across the globe.

Developed by 5 Star Plugins in the US

Our plugins go through rigorous testing prior to release and must be approved to meet the standards of WordPress.org plugin reviewers. Plugin updates are free to keep your site secure with the current version of WordPress. Free support is provided through the plugin’s WordPress.org support forum.

Share

Blog Home

5StarPlugins_Logo_horizontal_for website 620×300

Secure, world-class, quality-tested technology from California.

  • Home
  • Products
  • Support
  • Customer Login
  • Affiliates
  • Policy
  • Offer Terms
© 2025 5 Star Plugins

Powered by Press Wizards Hosting
  • Consent
  • Details
  • About Cookies

This website uses cookies to provide features and to analyze our traffic. We also share information about your use of our site with analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

Analytics & Performance

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

Cookies are small text files that can be used by websites to make a user's experience more efficient. The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website. Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy. Please state your consent ID and date when you contact us regarding your consent.

Deny Customize Allow selected Allow all