How to display the date of the last update of WordPress articles with Elementor

 
How to display the date of the last update of WordPress articles with Elementor

As I had to replace a snipet that did the same thing for a problem pHP 8 compatibility, I take this opportunity to leave here the steps to follow to show the date, and if you want the time, of the last update in your articles.

It can be added for almost all templates with CSS, a plugin (always the first option to discard) or a simple function, although with the Post Info widget from Elementor PRO widget (not available in the free version) simplifies the process and allows you to tweak the design a bit faster.

As well as informing your readers that it's updated content you'll be alerting search engines to the date that post was updated, it can regain rankings and show the update date in search results, which is beneficial for SEO.

Search engines tend to give love to pages that are updated regularly because it understands that content that is kept fresher is more relevant to readers.

Steps to display update date

How to display the date of the last update of WordPress articles with Elementor

1 - Drag the Post Info widget to the place in your template where you want to display the date.

Cómo mostrar la fecha de la última actualización con Elementor

2 - You choose the date format type and add the"Time" field as the second field. (You can also add the time later by pulling the format string of your choice without including that last "Time" field).

Some examples:

d/m/Y09/07/2021
l j F YFriday 9 July 2021
g:i a13:30 am
g:i:s a13:30:48 am

Here are some all date and time formats time that you can use as you like.

How to display the date of the last update of WordPress articles with Elementor

3 - In"Before" you can add the text that will appear before the date.

How to display the date of the last update of WordPress articles with Elementor

4 - Another new date field is added under the date.

How to display the date of the last update of WordPress articles with Elementor

5 - In the"Type" option, select"Custom" and it will be renamed"Custom".

How to display the date of the last update of WordPress articles with Elementor

6 - Then, in the icon called"Dynamic labels" you can access different options. Choose and select"Post Date".

How to display the date of the last update of WordPress articles with Elementor

7 - Now you will find a little tool symbol to the left of"Post Date". When you click on it, two options appear. Select "Post Modified"

How to display the date of the last update of WordPress articles with Elementor

8 - For this second date field you add in the"Before" box the text"Updated: " or"Last updated: "

How to display the date of the last update of WordPress articles with Elementor

And that's it, now you can format the dates to fit the layout of your template and add icons or display them without.

This is what the date looks like here:

How to display the date of the last update of WordPress articles with Elementor

Finally you can update any post and check that it runs well and then check if you are alerting search engines in the rich results test.

To do this, you enter the URL of that last post you just updated in this tool and click on "Test URL"

You display the first of the results or, failing that, the one closest to "Article". If everything is OK, you will see that the date and time of publication is already added and below that of the last modification as you can see in this screenshot.

How to display the date of the last update of WordPress articles with Elementor


Suscríbete por email para recibir las viñetas y los artículos completos y sin publicidad

Artículos relacionados

Este blog se aloja en LucusHost

LucusHost, el mejor hosting