wordpress set modified date
Wordpress

How to set Last modified WordPress post date

WordPress provide platform for many type of sites from eCommerce to blogging to government portal and many more. Some of them need to update frequently due to some changes happened since posting time but most of time user not aware about new changes on any existing post.

Sometime Google also shows publish date of post with search result.So if your post shows old date and same page others post shows new date then definitely user chance to move on updated post.

See below 2 post on same page and showing different dates.google show date search with post

It not only affect user but also SEO of your post.

So In this post I am showing you how to display last updated date so user know that the post was updated.

In order to see updated date on any of your post firstly choose any one of your post where any update needed..I am here using one of my post.. see below where date is showing when we had posted this article.wordpress posted date
Now open below pages(All files you will get in theme folder of your website)

  1. Index.php
  2. page.php
  3. single.php

Search below code in all three pages , you will see similar code not exact one.

<?php the_modified_time'F jS, Y');?>

or

<?php the_date(); ?>

or

<?php get_the_date(); >
Not all the theme have same code but ultimately you need to search from where data is updating and replace code with below code.

<div>on: <?php the_modified_date('F j, Y'); ?></div>

So it automatically update your date from latest modified date whenever you make any change…in my case see below, it is showing today’s date.

wordpress post show updated date

Hope you like this blog post…If yes then please subscribe this blog, follows us on twitter, like our Facebook page and if you have any doubt or want to add something then please write us in comment or contact us.

A big thanks for reading thanks

Pankaj Kamariya

An IT engineer by profession and blogger by passion. Very keen to explore new things online and Help people by sharing many legitimate ways of making money online.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.