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.
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.
To get started, we need a code snippets plugin. InfluenceWP has exclusive code snippet plugin deals, and there are some solid free plugin options out there as well, such as FluentSnippets.
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.
- 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 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
For example, you could drop the shortcode between the copyright symbol and your business name:
© 2025 - [current_year] Your Business Name. All rights reserved.Plaintext