When a new year begins, you wouldn’t want to login into over 20 of your websites just to update to the current year! This tutorial shows you how to add a dynamic year in elementor or set an automatic (current) year to your WordPress website using Elementor or in WordPress themes.
Note: the digits in brackets e.g. (00:02) indicate the minutes of that exact explanation in the video so you can easily jump to that section and follow along.
Video: Add Add Dynamic Year in Elementor Tutorial
There are two ways to display a dynamic current year on your website:
- If you have your copyright information with a year in the footer of your WordPress theme, for example, Astra; you can use a code snippet: [current_year] to display the current year.
- If your website has a footer section built using Elementor, you’ll have to add a dynamic condition with the current date & time.
Display Current Year Using a Code Snippet in WordPress Themes
When you go to the customizer of your theme in this case I’m using the Astra theme; go to the Footer section, under the Footer Bar, you’ll find that Astra automatically adds the [current_year] code for you (01:54), and your year will automatically update to current.
If you remove the [current_year] snippet from your customizer then publish and reload your page, the current year disappears (02:15)
Note:
Not every theme will accept this code snippet to automatically update your year. For some themes that don’t support the [current_year] code snippet, you’ll have to add the current year manually.
Also Read: How to Edit Footer Copyright Credits in Astra WordPress Theme 😋
Add Dynamic Year in Elementor (Display Current Year Automatically)
For this, you need to have an Elementor built footer section or any section built with Elementor where you would like to display the current year. Open it up with Elementor (02:43)
From your Widgets area, drag a Heading widget to your section (03:06)
Select your widget and in the Edit Heading section on the left, under Content > Title, click on Dynamic then scroll down and select Current Date Time under Site (03:19). The dynamic features only come in the pro version of Elementor.
Click on the spanner icon (🔧) to go to the current date-time settings, select Custom for the Date Format, then just add a ‘Y’ under Custom Format; to only display the year (03:47).
Go to Advanced to set up the Before, After, and Fallback options.
For Before; we want to display a copyright symbol by either copying the symbol (©) and pasting it there, or by using the © code snippet.
For After; add the name you want to show after the year.
Then for the Fallback option, set up what you want to display when the before and after options arent showing, for this case I’ll add ‘Copyright 2020’ (05:00)
When you’re done setting this up, go to Style, under Typography set the Font to Montserrat, the Size to 12 pixels, Weight 300, and the Color to white.
Select the widget and back under Content > Title > Current date time settings (🔧), add a space after the Y on the Custom Format option, and also add a space after the © option (05:51)
Under Content > Title > Alignment, you can align it the right (or wherever you want).
When you’re done, click the Update button and then reload and preview your page.
Also Read: How to Create a Top Header and Below Header using Astra
In conclusion
That’s how you can set up a dynamic year/date in your footer and have it automatically update to your current year every time new year comes; using a code snippet in your WordPress theme, or via your Elementor editor.
If you have any questions or comments, let me know in the comments section below, and don’t forget to subscribe to my newsletter and youtube channel for more of these tips and tutorials.
2 thoughts on “How to Add Dynamic Year in Elementor & WP Themes Copyright Footer (Dynamic Year in WordPress)”
Hi,
I am using the free version of Elementor and there is no option for “dynamic”.
In other webs without elementor I am using code and it just works fine, but I do not know how to do it with Elementor free version. Any idea?
Thanks
Hey Eltuyo,
As I mentioned in the article and video, you need to have Elementor Pro to use the dynamic features (current date-time). Alternatively, you may opt for the first option suggested and use a theme like Astra.