You can add a dynamic copyright date to a WordPress website using a dedicated plugin, a shortcode, or a code snippet. This ensures the year automatically updates, so you don’t have to edit it manually every new year.
Key Takeaways
- You can add a dynamic copyright year in WordPress with a plugin, a shortcode, or a PHP snippet.
- A PHP snippet plus a shortcode makes the year update automatically, with no yearly edits.
- To register a shortcode that outputs the current year, add the following snippet:
function dynamic_copyright_year(){ return date('Y'); } add_shortcode('current_year','dynamic_copyright_year'); - Place the shortcode
[current_year]anywhere you want the current year to display, like your footer. - Example footer text:
© [current_year] Your Business Name. All rights reserved.
Add a Dynamic Copyright Date Using a Code Snippet
For this guide, we are going to take the code snippet approach. This is a strategy you might want to use if you intend to add more code snippets to your website at some point.
What We Need to Get Started
We need a code snippets plugin to begin, and there are some excellent free plugin options out there, such as FluentSnippets. If you’re looking for premium solutions (paid) with more features or slightly different approaches and options, InfluenceWP has exclusive code snippet plugin deals.
With a code snippets plugin in place, we can then proceed with the steps below. The result will be a shortcode that you can drop anywhere on your WordPress site.
Steps to Add the Dynamic Copyright Code Snippet
- Add a new PHP code snippet to your site
- Copy the contents of the code snippet below, paste it into your code snippet, and save the changes
function dynamic_copyright_year() {
return date('Y');
}
add_shortcode('current_year', 'dynamic_copyright_year');PHP- Use the shortcode [current_year] wherever you’d like to add the current year to your website
Dynamic Copyright Shortcode Usage Example
As an example, you could drop the shortcode between the copyright symbol and your business name.
© 2025 - [current_year] Your Business Name. All rights reserved.PlaintextFrequently Asked Questions About Dynamic Copyright Dates in WordPress
What is a Dynamic Copyright Date in WordPress?
A dynamic copyright date is a year that updates on its own. Instead of editing your footer every January, WordPress displays the current year automatically.
What Are the Ways to Add a Dynamic Copyright Year in WordPress?
You can use a dedicated plugin, a shortcode, or a code snippet. This article focuses on using a PHP snippet that creates a shortcode you can place anywhere.
How Do I Add The Current Year With a Shortcode?
Add a PHP snippet that returns date('Y') and registers a shortcode named current_year. Then place [current_year] in your footer, within a block, or in a template where you want the year to show.
Where Should I Put the Shortcode on My Site?
Most sites place it in the footer near the copyright symbol and business name. You can also use it in headers, landing pages, or any text area that supports shortcodes.
Do I Need a Code Snippets Plugin to Do This?
A code snippets plugin makes it safer and easier to manage PHP snippets without editing theme files. It also helps if you plan to add more snippets later.