How to show the last day of the update on WordPress Pages and posts

Jun 23, 2022
Little figures showing last updated on posts and pages

Users will be able to see the most recent date in addition to the "Published" date. Alternatively, you can replace the Published date altogether.

How to View the Published dates as well as the Dates Most Recently Revised

An example of the published date on an old post.
This example shows the posted date of an older blog post.
The Twenty Twenty theme offers a unique published date format.
Twenty Twenty is a distinctive theme. Twenty Twenty theme offers a distinctive format for publishing dates.
The date on this theme is displayed below the content.
The date on this theme is displayed beneath the text.

Also, you can locate the date of publication at the back end, through the Date column of your Posts listing.

The Date column shows published dates in the WordPress dashboard.
The column in the column of dates displays dates that were published in WordPress's dashboard. WordPress dashboard.

WordPress will display the post date within the Post editor.

The Published date is the only date shown when editing a post in WordPress
The published date is the sole time that the date will be displayed while editing a post in WordPress.

In this this post, we'll go over why it is beneficial to show an "Last Updated" date, instead of dates of publishing. Additionally, we'll guide you through different methods to show the most recent date. We will also show the methods to determine when the website was last changed.

Keep reading to learn all about it!

The benefits of displaying Your Website's "Last Revised" Date on Your Website

They are among the benefits which display the "Last updated" time on both your page as well as on your posts.

  • The most current date is much more reliable than the date when it was first published, and this indicates that your content is probably fresher than content that was released some time ago.
  • The users will see it's an up-to-date article, and not believe it's an older one. This could increase the number of clicks and overall time users are reading.
  • Your "Last Updated" date is your possibility of standing out because search engines show those dates within the result pages and results are shown alongside the listings of other websites.
  • Search engines have been known to look your site more often whenever the content (and also the time of publication) has been updated. There is no hard and fast rule, but search engines are aware of websites that have frequently updated content and to crawl these sites faster.
  • because the entirety of your website is benefited by the articles you have updated.
  • It gives you a a visual excuse/reminder to update your site in case you find an old date and realize that a refresh is required.
  • Certain publications (like newspapers' websites) have a "Last Last Updated" date so that they can ensure that any content that is subject to updates and corrections is displayed in the upper part of the feed for this site. This is so users don't lose out on news updates.

What is the best way to display the Most Recent Day's Update in WordPress

It is a default feature that WordPress does not display the date most recently changed to reflect the latest or updated material, rather it displays the date of publication. It's still published regardless of whether it's couple of years old and many updates have been made to the content.

If you're having trouble including the date of last update on your WordPress Customizer, try these ways to include the information:

  1. Editing by editing the functions.php file and Editing CSS
  2. Through modifying the code in the template for your site
  3. Utilizing an extension

Take a look at the following three strategies to figure out the right method to take in your particular situation.

Method 1: Modify functions.php and CSS within your theme

Each option uses the identical CSS code. We'll offer you some codes you could to add, and then help you incorporate it within the functions.php file. If you're using a custom theme or a site-specific plugin, you can simply use the exact code and modify the file.

Open the functions.php file
Navigate to your functions.php file.
function show_last_updated( $content ) $u_time = get_the_time('U'); $u_modified_time = get_the_modified_time('U'); if ($u_modified_time >= $u_time + 86400) custom_content .= $contentreturn $custom_content; filter to add( the_content'),'show_last_updated' );

Save the downloaded file to your computer. This means that the latest date is displayed right before your post's content. The program first tests to determine if the posted date and the last date match.

If they're identical, you'll be able to see the publication date shown on its own. If they're different, the last date to be altered, they will be shown together with the publication date.

Frontend view of the last updated date
Frontend view of the most recent update date.

What are you able to do to modify the appearance of the new Last Updated Date

.last-updated-date font-size: large; font-family: monospace; text-transform: uppercase; color: white; background-color: black; 

NOTE: It's entirely possible to alter your CSS properties and the values depending on what you require These are just instances.

Insert the CSS code in the box after you click the Appearance tab, then Customize and Additional CSS within WordPress. This enables to use the CSS to be applied across the entire site instead of just on the one particular page or blog post.

Add CSS code for styling
Add CSS code for styling.
Frontend view after CSS styling
Frontend view following CSS styling.

How To Remove the Date of Last Update from other pages or content that has not been made public

Some sites don't need a last updated date on pages like a Privacy Policy
There are websites that don't require an up-to-date last date on pages like a Privacy Policy.

So, revisit your themes functions.php file and insert this code in between the numbers (86400 between the numbers 86400 to ).

&& is_singular('post')

This is how:

function show_last_updated( $content ) include_filter(  the_content', show_last_updated' );
The date gets stripped from all pages, but remains on posts
The date disappears from the pages, but is still visible on the page.

Remove the date of publication and only show the date that was updated.

It's not uncommon that the date public can stick around even after you've implemented the code that adds the last updated date. Certain themes take it off however, it's certainly not typical. Problem is, now there are two dates that appear in your WordPress posts: the published date, and the latest day that was updated.

While some circumstances may render acceptable, the two dates are likely to cause confusion for people reading. This is why you may want to mention the publication date but you must remember the most recently updated date.

Remove the date on which it was originally published, however, keep the date that was last changed (previously constructed using the strategies above) To accomplish this, click Appearance > Customize Additional CSS in the WordPress Dashboard.

Copy the code to the Additional CSS field:

.entry-date display: none !important; 

Click on the button to publish button to take the changes in.

Add CSS in the WordPress Customizer
Add CSS in your WordPress Customizer.

The date of publication has been removed, however the last updated date remains.

Frontend view of the last updated date still there without the published date
View of the frontend with the most recent update date, but without the date it was originally published.

Take note that even though you can use the .entry-date CSS class name is commonplace in numerous themes, it's not utilized for the vast majority of the themes. If this approach isn't working for you, the reason is likely to be that your theme is using an unrelated class name, that isn't .entry-date.

But the CSS code is still good that's why all you have to find what is the name of the class which your theme uses to determine the publication date. To find that information, go to the blog's front page post, and select the right-click on the date that was originally published, which is now being displayed. Choose Inspect. The Inspect option (this will differ based on the browser. Chrome utilizes " Inspect," Firefox uses " Inspect Element," and for Safari you need to hit the option key and press C)

Right click on the date and choose the Inspect option
Click right on the date and select the option to inspect.

This reveals this is what you can find in the developer's tools section of the browser. The code component is displayed of the webpage you're currently viewing, and in particular the CSS code of the web page element you clicked.

The date should appear as the main element if you clicked on the date. But if not, look for a tab for . The CSS class for your published date will appear after it; in this case, it's the entry-date. However, developers can utilize a number of these to create themes such as post-date, posts-date published-dates, posts-dates or posted-date.

Look for the "time class=" snippet and the information after it
Search for "time classes =" A snippet of text as well as the information after it.

Copy only that particular class (not the parentheses or any of the other components).

Paste the code in the following CSS snippet, replacing yourthemes-class-name. You must ensure that you have punctuation marks in front of the name of your class.

.yourthemes-class-name display: none; 

And that should do what you want!

The quickest (But only Sometimes Useful) Way to Get Rid of the Date of Publication

A simple and non-coded method to remove the published date but maintaining the date as it was when it was last changed (inserted by the prior method) This can be done through cutting out the formatting for dates within the General Settings of WordPress.

If you're using WordPress In WordPress you can go to settings > general and then Settings > General. After that, scroll down to the Date Format along with time format sections. Select the custom option for both of them and remove the sample formatting for each of the fields. Choose the Save the changes button to the right.

Choose Custom and clear out the fields
Select Custom and then clean out the fields.
You should see the updated date without the published date on the frontend
It should show the latest date and not show the public date in the front-end.

Method 2: Edit Your Theme Template

It's possible that you'll require some digging, but the idea is to identify your templates (and the template's code within the template) that are responsible for publishing the date and time in the frontend. Developers differ as well on the kind of templates they employ however, you'll usually find the date of publication's code in one of these templates.

  • index.php
  • page.php
  • single.php
  • archive.php
  • content.php
  • template-tags.php
  • template-functions.php
  • A PHP file is found in the directory within the directory directory.
  • A PHP file that is located within the "/post" folder
  • A PHP file located within the content directory.
  • The file is in the extract folder.
  • An image file in the /template-parts directory.

It's the choice of the designer (and the design), so you must find out where you can find the correct code and then locate an alternative file name than the one mentioned below.

Here are some ideas for locating the appropriate theme file:

  • Get in touch with the creator of your theme to inquire about which template controls the output of the date of publication for your postings. Also, you can find the template you are looking for online or via the theme's forum for users.
  • Look through the most popular template designs for themes. You can start by using index.php, page.php, and single.php to find themes that are simpler. However, the most popular themes employ files like /templates-parts, /excerpts, and /inc.
  • Make use of to use your FTP client's search function to search for texts that are similar to those that have been published. You can also use the times find_the_time function to locate, or even get_the_date.

Indicators of the Published date contained in this file are:

Are you interested in knowing the ways we have increased number of visitors by 1000%?

Join over 20,000 others to receive our weekly newsletter with insider WordPress advice!

  • A ode to the quality of time
  • receive_the_date code
  • "Published" Text
Various indicators to find the file that serves up dates
Different indicators for locating the file that serves up the date.

If you notice indicators that are similar to these, you need to select one of the elements within the code to display the latest updated date. The best way to do this is to put the new code before or after the section that has already displayed the current date.

Copy and paste it into the desired location:

$u_time = get_the_time('U'); $u_modified_time = get_the_modified_time('U'); if ($u_modified_time >= $u_time + 86400) echo "Last Updated on "; the_modified_time('F jS, Y'); echo " at "; the_modified_time(); echo " "; 
Paste the code into your template file
Integrate the code into the template file.

Templates are likely to be slower to determine the correct spots, but they pay dividends with a variety of benefits- mainly that the last modified date is actually displayed at multiple places.

One of those areas is the place in which you enter the code to post. In this instance it is now capable of viewing the current changed date, and also the post's content in the lower part of the page. It's right prior to the date of publication.

The last updated date now shows on each post
The date of the last update can be found on each blog page.

Modifying the template for your theme will also display the most recent date in the primary blog/archive page. It is the place where all WordPress blog posts are listed in chronological sort of order. So, each post that is updated shows the date on the page listing, giving readers with greater clarity about the freshness of your content.

This method also reveals the last updated date on your main Blog/Archive page
The method will also reveal the most recent date for making changes to the blog's archive page.

Modify the location where the Date of Last Updated Appears

Theme templates dictate what dates will appear in WordPress blog posts. They also decide which place the date is listed in the blog article.

So, you must utilize themes to alter how the most recent or published date gets placed in a blog article. In some cases, it's simply changing the code you've entered to Method 2 somewhere else in that same PHP file.

In other instances, that PHP file might be a "template component" file. The file is pulled through a master template, which arranges the various template components which result in the layout for the blog.

Looking at the Twenty Twenty One theme example from before, it's clear it's clear that template-tags.php file is just a tiny piece of code which is later added to the primary post theme file. So, you have to ask the designer the theme that handles your the formatting of your posts, or to do some research on your own.

We cannot ensure that this works for every theme It's an ideal starting place to search to find the "master" template of the theme. It is something similar to single.php, content-single.php, or even post.php.

If you are using the Twenty Twenty One theme, it's possible to add the most recent code either in single.php or content-single.php considering that single.php serves as an "master" template, but content-single.php will be the templates document that single.php draws from.

Open the content-single.php file, or whichever template part file has the code that displays dates
Navigate to your content-single.php file. or, the template file that includes the code for displaying dates.

For moving the position of the date which was last updated use the method described in Method 2 and then paste the text where you want the date to appear. It is evident that the document has head and heading section, and a tiny part of the content and we'll put the code for the date that was last updated right between those two sections by moving it from its normal position beneath the content. It will be placed just prior to the content.

Move the code to a suitable position
Move the code to a position that is suitable to.

The front-end will show the date that was last updated will now appear where you'd like, or you could take out the duplicate date from the earlier location (towards towards the bottom) or put them all in the same place.

The last updated date is now at the top of the post
The most recent date for updating appears on the top of this page.

The Last Updated Date is added within the Astra Theme

In order to give you an understanding of the different ways every theme functions, the Astra theme (with its Travel Blog starter template) does not display the most recently published date by default. But, you are able to add the latest date. To insert the date using the method described in this article follow the steps: /wp-content > /themes > theastra in the FTP client. Then, start the functions.php file.

Open functions.php
Open functions.php.

Copy the Method 1 code at the final page of your fileand then copy it onto your server. The code will display the most recent updated date, which will appear in the upper right-hand corner of the post on your blog.

A frontend view of the last updated date in Astra
Frontend views of the latest date in Astra.

Utilizing Method 2, locate the template for your theme that is called single-layout.php. The template is located in the /astra folder, /template-parts. single.

Open the single-layout.php file
Navigate to your single-layout.php file.

The code used is the same howeversome themes need you to specify you are using the PHP code; so you must include the  code in brackets if you're seeing code appearing on the front end, however, it's not rendering the date.

It must look as follows: following:

= $u_time + 86400) TheCustom_content .= $content, return $custom_content include_filter( the_content" the_content',"show_last_updated' );

Just above the line that includes the_content code.

Insert code into single-layout.php
Insert code into single-layout.php.

The upload of the latest file to the server produces an up-to-date sequence that is prior to content launching on Astra. Astra Theme!

Last updated date result on the frontend of Astra
The date was last updated on the frontend of Astra.

The Last Updated Date should be added in the Neve Theme

If you want to turn off the feature in WordPress Go on to Settings > Appearance Layout > Blog/Archive. Select the Post Meta drop-down. Check that the Date is displayed under Meta Order. After that, you can turn on the option that says " Use last updated date instead of the original day."

The date that is the most up-to-date appears on the blog's homepage along with every individual post.

Neve makes it easy with a Customizer setting
Neve can make it simple by allowing you to customize the setting.

By inscribing the date of last Update within the theme Zakra WordPress

Zakra is an alternative. There is a possibility that you need to visit the parts of the template folder in the WordPress documents to discover the code that serves up the published date. The correct place is within inside the inside folder.

To add the last updated date onto Zakra for the purpose of adding dates, you need to connect using an FTP client and enter your website's /themes folder. Then, navigate into to the Zakra folder, and then the directory /inc and click template-tags.php. Change the template in the file.

Open the template-tags.php file
Navigate to your template-tags.php file.

Copy the code previously mentioned in between ); (from the get_the_time function) and the value of $posted_on will be sprintf(. The code is then saved to the server.

Paste the code inside the Zakra theme template
Input the code in the template Zakra theme template.

The date is now displayed at the top of the right hand area of each article for this theme. Zakra theme.

The last updated date on the frontend of Zakra
Last updated date is on Zakra's front end. Zakra.

If you're having difficulty Editing Your Theme Design

In any case, the majority of issues with dealing with the last updated date can be traced to files that are hardcoded or some other form or distinctness within the file. Therefore, it's generally best to speak with your theme's developer and let them know your needs. They can often give you a prompt solution by with the appropriate CSS as well as PHP code to suit your specific scenario.

Method 3: Apply the Plug-in

Having said that it is likely that none of the methods work, or do not perform as you would like. Consider activating and installing this WordPress Last Modified Info plugin.

The plugin will take the guesswork out of the equation, it allows you to add the date that was last altered, change the settings (like substituting the previous posted date) and then format the date's appearance and location.

The WP Last Modified Info plugin
It is one of the WP Last Modified Information plugin.

Once activated Once it is activated, go to Settings > WP Last Modified Detailsin The WordPress dashboard. On the post's Options Page, turn to the setting "Enable for Pages and Posts on the Frontend. "

Enable for Posts and Pages on the frontend
It is possible to allow Posts and Pages on the frontend.

You can also switch the method used to show to:

  • Before Content
  • After Content
  • Replace the Published Date with a new one.

Scroll down on the page for additional settings for:

  • Date formatting
  • Time formatting
  • Time interval
You can choose to replace the published date with the last updated date
You can substitute your date of publication with the most recent date.

It is important to save the settings in order to include the date of the most recent update on the front of your page. If you notice something that doesn't appear just right, revisit your settings and see the options that will fix the problem to what you'd like to view it.

A frontend view of what the plugin displays
The front-end view shows what the plugin displays.

The plugin automatically activates the date of last update for pages, too. If you'd prefer to change this setting, return to the settings in your plugin and fill in"Pages Post Types" in the " Post Types to display updated information" field. Enter "Posts" into the box in order to verify that there are no changes in the page's posting type. Once you've made all changes, make sure you click the Save Settings button.

Only show the updated date on Posts
Show only the latest date on the posts.

What is the best way to know when a WordPress Page or Post was last updated

The display of the latest update date in the WordPress blog page is an important thing. How do you determine when an blog post last changed? The end result is essential to determine the date of old articles that need to be changed.

Additionally, looking over the latest updated and published dates can aid in identifying issues you might have when you add the latest date. As an example, a majority of the code in this article requires there is a final modified date in order to pull. It means you'll not be able to locate dates when this article isn't updated and it isn't found the date until you search for it on the backend.

However, WordPress does not automatically show the changed and the Last Updated date on the front page once you've added your blog posts or pages regardless of having implemented one of the methods that we have provided in the past methods. If you visit the post page within WordPress displays only the publication date column.

There's only a Published Date column on the backend post list
There's only one published Date column on the listing of posts in the backend.

This is also true of the editors of both pages as well as posts. You may check the post tab to find the date of publication date but not the exact date when the last update was made.

Only the Published date gets shown by default
Only the date of publication is shown as a default.

A built-in method to gain an idea of the Most Day of Update in WordPress

Without assistance of the built-in display feature you must open the blog post that you want to edit and click the post tab which is on the left. Look down for an revise button.

  • If you do not see the revisions button, this indicates that you haven't updated it.
  • If you are able to see an Revisions button, press the Revisions button.
Click the Revisions button to view the list
Click on the Revisions button to open the entire listing.

Although this isn't a guarantee for finding the last day of the update, it does give the reader an idea of the events on this post.

Revised revisions are stored in WordPress regardless of whether you write the content. As such it is possible that you have revision logs that do not have latest dates for updating. It is possible to look over the past revisions to see which of them you published the latest, as per the content in the rev.

Each revision is recorded with the time and date of the revision that you are able to place bets on as the latest date , too.

Check for the Last Modified date within the revisions
Look up the date of last Modified in the revisions.

If you've installed the latest date-updated code in an earlier method but you're still not getting a date displayed on the frontend, this is a useful method of determining if the posting has updated date information initially and if not it won't show anything.

Additionally, you can use a plugin Locate the date of Last Update on the Backend

The WP Last Modified Info plugin does more than incorporate an Last Modified date to the frontend, but it also adds sections and columns on the dashboard to make it easy to find post that you've not updated in a while.

Once you've got The WP Last Modified Info plugin and activated, go to the post list on WordPress. This plugin will automatically add another column below the date called "Last Modified".

The plugin includes a new backend column for the Last Modified date
The plugin has a new column in the backend that shows the last date for modification.

This plugin adds an extra option in the editor called Last Updated that displays the last update date and time of the particular post.

The Last Updated tab within the post editor
The tab for Last Updated is found within the post editor.

Summary

In this post, you will learn:

  • What can you tell us about the date that the last time the website was changed?
  • The benefits being able to display the most current date for updates on your website
  • How do I show the latest date in WordPress with the help of these techniques:
  • Method 1: Editing functions.php and CSS within the theme
  • Method 2. Editing template templates for themes
  • Method 3. Making use of a plugin similar to WP Last Updated Information

We also discussed tips on:

  • How can you alter the design of the last updated date
  • What can I do to get rid of the most recently day of the update from pages, or anything else that's the subject of a blog post.
  • After that, you can remove the date of publication to ensure that it is only the day on which the publication was changed shows.
  • Change the place in which the most recent date appears on a webpage

In the end, we demonstrated how you can add the latest date to several popular themes, including:

  • Twenty Twenty One
  • Astra
  • Neve
  • Zakra

Comment below in the comments section if you need any additional help on how to show the Last Date Updated in your WordPress website!

Save time, money, and improve site performance

  • Assistance with immediate assistance is provided by WordPress specialists in WordPress hosting 24/7.
  • Cloudflare Enterprise integration.
  • Reaching a global audience with 34 data centers across the globe.
  • Optimization with our integrated Application performance monitoring.

This post was first seen on here