The mention "updated on" allows you to indicate to your readers the date of update of the article.

A regularly updated article helps to maintain good positions in search results (SERP). This is an important SEO criterion!

However, Internet users may not realize at first glance that the article is recent because most of the time, it is the date of publication that appears.

If your article was published 5 years ago but you update it every year, it would be a shame to risk losing readers who think the article is obsolete!

In this tutorial, we will see how to add the mention "updated on" in the metadata of your Divi articles.

As you can see, this statement is displayed under the breadcrumb trail of my articles on Divi Tips.

Ajouter "article mis à jour le" dans Divi
Left: default metadata - right: metadata with the mention "updated on".

Advertisement: This article contains affiliate links that you will easily recognize. The classic links are in purple and sponsored links are in pink.

Here is the program of the article:

  1. What is an article metadata?
  2. Why should the mention "updated on" be preferred to the date of publication of an article?
  3. The importance of updating a blog post
  4. How to display the update date in a Divi article?
  5. Manage metadata in Divi
  6. In conclusion....

1 - What is an article metadata?

WordPress article metadata is information related to the publication of a post. This information is automatically inserted into your articles without you having to do anything.

Of course, the types of metadata and the location of display depend on how the WordPress theme was coded.

Some themes do not display them, others display them automatically and others, such as Divi, offer options for choosing the metadata to display.

A metadata can be information related to:

  • the date of publication,
  • the author of the article,
  • the category or label in which the item has been classified
  • the number of comments
  • etc.

This metadata reveals important information to your reader.

For my part, I am very attached to this data when I do web research to document myself. When the blog doesn't display them, it bothers me because I don't know if the article is recent and if I can rely on its content... It also allows me to know if the blog in question is well maintained or not: frequency of publication or very random publication. All this information can therefore have an impact on the credibility of a blog.

obtenir Divi - get Divi

2 - Why should we prefer the mention "updated on" rather than changing the publication date of an article?

Surely you're thinking that it's easy and that you just have to change the publication date of the article?

Well no, this is not the most recommended way to do it as you can see in this article (or in this one in English).

If you have the bad habit of changing the publication date of your articles in order to fool robots and get "cool" dates in search results, your site could be penalized by Google.

It wouldn't be honest either for your readers, especially if you haven't changed a single word in the article! This would only increase the bounce rate of your site and lose credibility.

In addition, some articles could not be rescheduled simply because there may be an inconsistency between the content and the date it was published. This could make the Internet user suspicious....

And finally, know that if you change the publication date of your articles, the comments will keep their original date.

For example: article published on 24 July 2019 - commentary published on 12 April 2018. A little weird, isn't it? I'm sure you've seen this before!

That's why there is a best practice: add the update date to the metadata of your article.

"mis à jour" apparait sur les vignettes du blog
The mention "updated on" also appears on the blog thumbnails

Why display the update date in the metadata rather than in the article directly?

Because metadata is visible within the article, under the title, but also from the archive pages (blog page, category archive page etc.)

Did you know that you can test Divi for free? Go to this page and click on "TRY IT FOR FREE"

3 - The importance of updating a blog post

Updating your old articles is a strategy that helps you stay competitive in search results and continue to generate traffic to your blog.

The Internet moves very fast and the topics covered are often covered by other bloggers. The idea is to try to keep a good place in the research results, even several years after publication.

Updating your articles allows you to improve your SEO (natural referencing) and to capitalize on the work already done. Because yes, writing is a job!

Just because your article doesn't mention that it has been updated doesn't mean that Google doesn't see it... Phew! Phew! That's good news already.

Indeed, even if the update date does not appear in the metadata of your article, it appears in the source code of your article, within the section .

property "article:modified_time"
Meta property = "article:modified_time" - this tells robots when your article was updated.

As you can see on this screenshot, a is inserted in the section of your site when you modify an article already published.

By scanning your site, Google sees this information that tells it that you are maintaining your blog. And soon your visitors will also see it thanks to this tutorial....

Want to customize Divi as a pro? Discover all the tutorials!

4 - How to display the update date in a Divi article?

To edit the metadata of your Divi articles, you will need a child theme.

This is the most secure way to modify a WordPress theme without losing its customizations the next time it is updated and without the risk of making irreversible mistakes.

You can obtain a Divi child theme for free here or learn how to create it.

A child theme must use a functions.php file, you just have to edit it and add the following piece of code:

function ad_last_updated_post( $the_date ) {
     if ( 'post' === get_post_type() ) {
         $the_time = get_post_time( 'His' );
         $the_modified = get_post_modified_time( 'His' );
         
         $last_modified =  sprintf( __( 'Mis à jour le %s', 'Divi' ), esc_html( get_post_modified_time( 'd/m/Y' ) ) );
         $published =  sprintf( __( 'Publié le %s', 'Divi' ), esc_html( get_post_time( 'd/m/Y' ) ) );     
         
         $date = $the_modified !== $the_time ? $last_modified . ' | ' .  $published : $published; 
    
         return $date; }
 }

 add_action( 'get_the_date', 'ad_last_updated_post' );
 add_action( 'get_the_time', 'ad_last_updated_post' );

See the source of this PHP code.

Once this code has been added, you will see the date of the last modification of your articles directly.

"mis à jour le"

You can of course adapt the code to your needs and change the date format or its wording. Use:

  • d/m/Y for a date such that 30/08/2019
  • d/m/y for 30/08/19
  • M j, Y for a date such that Aug 30, 2019
  • F j, Y for August 30, 2019

Others date formats are possible here.

Update of 17 September 2019: following a very good comment by David in commentary, the previous code was concerned to display the update date as soon as the publication date. David then proposes the following code so that the update date does not appear if the modification date of the article took place within 5 days following its first online date:

function ad_last_updated_post( $the_date ) {
    if ('post' === get_post_type() ) {
        $nb_days_between = (get_post_modified_time() - get_post_time())/86400;
        $nb_days_to_compare = '5';
        $last_modified =  sprintf( __( 'Mis à jour le %s', 'Divi' ), esc_html( get_post_modified_time( 'd/m/Y' ) ) );
        $published =  sprintf( __( 'Publié le %s', 'Divi' ), esc_html( get_post_time( 'd/m/Y' ) ) );
        $date = $nb_days_between > $nb_days_to_compare ? $last_modified . ' | ' .  $published : $published;
        return $date;
    }
}
add_action( 'get_the_date', 'ad_last_updated_post' );
add_action( 'get_the_time', 'ad_last_updated_post' );

Thank you David 😉 !

5 - Manage metadata in Divi

Beyond adding the update date of your articles, you may need to enable or disable some other article metadata.

This will be possible from 2 different locations:

  1. The options of the Divi theme
  2. The options of the Blog module

5.1 - From the theme options

métadonnées page d'archive Divi
Set up the metadata to be displayed on the archive pages

In the Divi tab > Theme Options > Layout tab, you will find metadata display options.

Everything is detailed in this article dedicated to the Layout tab of the Divi theme options.

5.2 - From the options of the Blog module

choisir les métadonnées à afficher dans le module blog Divi
Choose the metadata to display in the Divi blog module

If you use Divi's Blog module to display your articles, you will see a whole bunch of options available.

In the module settings, go to the Content tab > Items to enable or disable the following information:

  • Image of emphasis,
  • The read more button,
  • The name of the author,
  • The date of publication,
  • The categories,
  • The number of comments,
  • The extract.

So you can decide what should appear on your blog post thumbnails.

If you have added the mention "Updated on", it will be visible if the display of the publication date is active.

6 - In conclusion....

Too bad Divi doesn't offer this option natively! But you saw in this article that it is not difficult to add an update date to your Divi articles....

Oh, I almost forgot! Here is one last little SEO tip:

The enriched search results (richs snippets) will not show the update date of your article but always the publication date.

This means that the user will not know - from the search results - that your article has been recently revised!

So why not add a small mention within the meta-description, the one you enter using the Yoast plugin?

Afficher "mis à jour le" dans la méta-description
Include the mention "updated on" in the meta-description of Yoast SEO

The user will be able to see, at first glance, that your article is recent = increase in the click rate.

This way, you will continue to generate traffic while respecting Google's recommendations.

Need more resources on Divi? Visit ElegantThemes' blog full of ideas and tutorials!

Mention "mis à jour" article Divi

Pin It on Pinterest

Shares
Share This