How to show the last day of updates on WordPress Pages and Posts

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

Users can check the date of the last update along with the "Published" date. Alternatively, you can replace the Published date altogether.

What is the best way to view the published dates, as well as the dates that were 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 distinct format for publishing dates.
The date on this theme is displayed below the content.
The year of the theme appears beneath the text.

You can also find the date when the post was first published on the back end, through your dates column on Your Posts listing.

The Date column shows published dates in the WordPress dashboard.
The column in the column of dates shows dates which were posted in the dashboard for WordPress. 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 date that was published is the sole time that the date is shown during editing a post on WordPress.

In this blog this article, we'll explain why it is beneficial to have an "Last Updated" date instead of dates for publication. Additionally, we'll guide you through the various ways for displaying the latest date. Additionally, we will show methods to determine what date the site the last time it was changed.

Read on to learn more about it!

Benefits of showing Your Website's "Last Revised" Date on your website

They're among the features that display the "Last updated" date on your page as well as in your blog posts.

  • The most recent date is more trustworthy than the date when it was first published, and this indicates that your material is newer than material that was made public a few years some time ago.
  • The users will see it's current and will not be able to believe that it's an old one. This can increase the amount of visits and the total amount of duration of the article that users read.
  • Your "Last updated" date has the potential of being noticed due to the fact that search engines highlight these dates on their result pages. Results are displayed alongside the listings of other websites.
  • Search engines have been known to visit your website more frequently whenever material (and also the time of its publication) has been revised. There's no definitive or fast rule, however the search engines have a sense of sites with frequently updated information and are able to index these sites faster.
  • because the entirety of your website benefits from the articles you have updated.
  • It serves as an excuse or reminder to refresh your website in case you find an older date and realise that a refresh is required.
  • Certain publications (like newspapers' websites) include an "Last last updated" date to assure that all information that requires adjustments and changes is visible at the top of the feeds for this website. It is to ensure that the users do not be left out of news updates.

What's the most effective way to display the Most Recent Days Updates in WordPress

It's a feature that is default which means that WordPress does not display the date most recently changed in order to display the most current or most recent material, but instead it displays the date of publication. The content is still available regardless of whether it's couple of years old and many updates have been made to the information.

If you're experiencing difficulty adding the date of the last update in the Customizer of your WordPress Customizer, you can try these ways to include this information:

  1. Editing by editing in the functions.php file and Editing CSS
  2. By altering the code within the template of your website
  3. Utilizing an extension

Look over the three options below for determining the most effective way to handle the particular circumstances.

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

Every option is based on the same CSS code. We'll offer you some codes you could to add, and help you integrate it within your functions.php file. If you're using a customized theme or site-specific plugin, you can simply use the exact code and modify the file.

Open the functions.php file
Navigate to the 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' );

Download the file and save it to your computer. It means that the most current date will be displayed ahead of your blog's content. It first checks to find out if the published date and the last date coincide.

If they're similar If they're identical, you'll view the date of publication on its own. If they're different in time, and the final date has to be changed will be shown together with the date they were published.

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

What do you have the ability to change to alter the look of the latest 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 change your CSS properties and the values depending on what you require These are only examples.

Add the CSS code in the field after clicking "Appearance, then Customize and Additional CSS in WordPress. This allows the CSS to apply throughout the site , not just 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 Do I Remove the Date of Last Update from any 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 sites like Privacy Policy.

Also, go back to your theme's functions.php file and include this code within two numerals (86400 between the numbers from 86400 to ).

&& is_singular('post')

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 displayed in the text.

Remove the publication date and just show the date it was updated.

It's not unusual that public dates can persist even after having installed the code which adds the most recent date. Certain themes take it off but this isn't common. Problem is, now there are two dates that show up in your WordPress articles: the posted date and the most recent day that was updated.

Although certain circumstances could make acceptable, the two dates will likely cause confusion for people reading. That's why you might want to mention the publication date but it is important to remember the most recently updated date.

Take out the date the original post was published However, you should preserve the date on which it was the last time it was changed (previously constructed using the strategies described above.) For this to be done simply click Appearance > Customize Additional CSS within the WordPress Dashboard.

Copy the code into in the Additional CSS field:

.entry-date display: none !important; 

Click on the button to publish button to take the edits into.

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

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

Frontend view of the last updated date still there without the published date
The frontend view shows the most recent date of update however, without the date it was originally published.

Be aware that while it is possible to use the .entry-date CSS class name is commonplace in numerous themes, it's not used in the majority of themes. If this approach does not work then the cause is likely to lie in the fact that your theme is using an unrelated class name, that isn't .entry-date.

However, the CSS code is still good and that's the reason you need to determine is what the title of the class your theme utilizes to determine the publishing date. To locate that information head over to your blog's front page post, and select the right-click on the date the post was published originally, and which is now being shown. Click Inspect. The Inspect option (this will differ based on your browser. Chrome utilizes " Inspect," Firefox uses " Inspect Element," and for Safari you must press the option key and hit C)

Right click on the date and choose the Inspect option
Right-click on the date and select the option to examine.

It is this what you can find in the developers' tools part of the web browser. The code element is shown on the page you're currently viewing, and in particular the CSS code for the web page element you click.

The date should appear as the principal element when you click on it. However, if it doesn't, search for a tab for . The CSS class of your posted date will appear after it as in this instance it's an entry date. However, developers can utilize a number of these themes to make them more appealing, such as posts-date, posts-date published-datesand posts-dates as well as published-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 the class you want to copy (not the parentheses, or other components).

Paste the code in the following CSS snippet, replacing yourthemes-class-name. It is important to ensure that there are punctuation marks the middle of the name of your class.

.yourthemes-class-name display: none; 

It's up to you whatever you'd like!

The fastest (But Only Occasionally Useful) method to rid yourself of the Publication Date

A simple and non-coded method to remove the published date however, keeping the date the way it was when it was last modified (inserted in the first method) This is done by cutting out the date formatting within the General Settings of WordPress.

In the case of WordPress If you're using WordPress you'll need to navigate to settings under general and then Settings > General. Following that, go to the Date Format along with time format sections. Pick the personal option for both and remove the sample formatting for each of the fields. Select the save the modifications button on 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
The date should be the most recent date instead of showing the date that is public in the front-end.

Method 2: Modify Your Theme Template

You may need some research, but the idea is to find your templates (and the template's code inside the template) who are accountable for publishing the time and date in the front-end. The developers differ on the kind of templates they employ but, generally speaking, you'll find the code for publication's date within these templates.

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

It's the choice of designers (and the look), so you must discover where to find the correct code and search for a different file name than the one mentioned in the following paragraphs.

Here are some tips to locate the correct file for your theme:

  • Get in touch with the person who created your theme and ask which template controls your output for the publication date for your postings. You can also find the template you are looking for online or via the theme's forum for users.
  • Look through the most popular templates for themes. Start by looking at index.php, page.php, and single.php to find themes that are simpler. But, the most well-known themes employ files like /templates-parts as well as /excerpts and /inc.
  • Use Your FTP client's search function to search for texts that are similar to those which have been published. You can also utilize the functions times find_the_time to locate, or even find the date.

Indicators of the Published date that are contained in this file are:

Are you curious about the methods we've used to increase the number of visitors by 1000%?

Join more than 20,000 other users to receive our email newsletter filled with expert WordPress guidance!

  • A tribute to the beauty of the passage of time
  • get_the_date code
  • "Published" Text
Various indicators to find the file that serves up dates
Diverse indicators to find the document that contains the date.

If you see indications that are identical to them, then you'll need to choose any of the elements inside the code to display the latest updated date. The most effective way to accomplish this is to add the latest code before or just after the one which has displayed the date of the present.

Copy it and paste it into the desired place:

$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
Incorporate the code in the template document.

Templates will likely take longer to identify the right spots, however they yield number of advantages, but the most important is that the last modified date can be displayed in multiple spots.

One of those areas is where you enter the code to post. This time, it's now capable of viewing the current changed date as well as posting's contents on the bottom of your page. The date is right before the date of publication.

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

The template you modify for your theme will also display the most recent date in the first archive or blog page. This is where the majority of WordPress blog posts are listed in chronological sort of order. So, each article that has been updated displays the date of the update on the listing. This gives readers greater clarity about the freshness of your blog's content.

This method also reveals the last updated date on your main Blog/Archive page
This method also reveals the most recent date for changing this blog's archives page.

Modify the area at which the Date of Last Updated Appears

The template templates define what dates appear in WordPress blog articles. They also choose the location in which the date appears in the blog article.

Therefore, you should use themes to alter how the latest or most recently published date gets placed in a blog post. In some cases you can simply change the code you've entered to Method 2 somewhere else in the same PHP file.

It is also possible that the PHP file could be it's a "template component" file. It is pulled from a master template, which arranges the various template components which result in the layout for the blog.

When you look at the Twenty Twenty One theme example that we have previously discussed, it's clear that template-tags.php file is simply a tiny bit of code, which later integrated into the primary post theme file. Therefore, you must request the designer to create the theme that handles your the formatting of your posts, or to investigate on your own.

We cannot ensure that this is the case for all themes. It's an excellent where you can search for your "master" template of the theme. It's similar to single.php, content-single.php, or even post.php.

If you're running Twenty Twenty One as your Twenty Twenty One theme, it's possible to add the latest code within single.php or content-single.php considering that single.php serves as an "master" template. On the other hand, content-single.php will serve as the templates document that single.php takes its inspiration from.

Open the content-single.php file, or whichever template part file has the code that displays dates
Browse to your content-single.php file. Also, download the template with the source code for displaying dates.

For moving the position of the date that was last updated use the procedure that is described in Method 2 and add the text to the place you want the date to be displayed. The document is divided into a head and section heading section, and just a little bit of the text so we'll insert the date's code which was last updated between the two sections, shifting it away from its usual location below the content. It will be placed just prior to the content.

Move the code to a suitable position
Change the code into a position that is suitable for.

The front-end of the page will display the date that was last modified. The date will be displayed where you'd like. Or, you can remove the duplicate date that was in the previous location (towards towards the lower part) or put them all together in the same location.

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

This Last Updated Date is set within the Astra Theme

To provide you with an understanding of the many methods that each theme operates, Astra, for instance Astra theme (with its Travel Blog starter template) doesn't display the most recently published date in default. You are however able to insert the most recent date. In order to insert the date, follow the method explained in this post, go through the following steps: /wp-content > /themes > theastra within your FTP client. After that, you can start with the functions.php file.

Open functions.php
Functions.php. functions.php.

Copy the Method 1 code at the last page of your document and then copy it onto your server. It will show the most up-to-date date, which will appear in the upper right-hand area of the blog post. your blog.

A frontend view of the last updated date in Astra
Frontend images of the most current date in Astra.

Utilizing Method 2 Find the template you want to use for your theme , it's called single-layout.php. The template is located in the /astra folder, in /template-parts. single.

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

The code used is exactly the same, but some themes need you to specify that you're using PHP code. Therefore, you have to include the code within brackets when you see code appearing at the top of the page however it's not rendering the date.

It should look like this: following:

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

Above the line which contains 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 the most current sequence, which is before content launches on Astra. Astra Theme!

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

the Last Updated date must be listed in the Neve Theme

If you would like to switch off this feature within WordPress go at the Settings menu > Layout Options > Blog / Archive. Click on the Post Meta drop-down. Make sure to see if the date appears in the Meta Order. After that, you have the option to enable the option which says " Use last updated date instead of the original date."

The day that is most current is displayed on the homepage of the blog as well as every single post.

Neve makes it easy with a Customizer setting
Neve can make it simple through the ability to modify the settings.

Inscribing the date of last update within Zakra WordPress. Zakra WordPress

Zakra is an alternative. There is a possibility that you have to go through the areas of the template folder in the WordPress documents to locate the code responsible for serving up the date that is published. The correct place is within inside the inside folder.

To add the last updated date to Zakra, for purposes of including dates, you'll must connect with an FTP client. Then, access your website's /themes folder. Then, navigate into the Zakra directory, then go to the directory/inc, and then click template-tags.php. Modify the template within the file.

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

Copy the previously mentioned code in between ); (from the get_the_time function) and the value of the $posted_on will be sprintf(. This code will be transferred on the server.

Paste the code inside the Zakra theme template
Enter the code into the template Zakra theme template.

The date is now displayed at the top of the right-hand side of every page in this theme. Zakra theme.

The last updated date on the frontend of Zakra
Date last updated is Zakra's frontend. Zakra.

If you're struggling to edit Your Theme Design

Whatever the case may be, the majority of issues associated with handling the last updated date can be traced to files that have been hardcoded, or some other kind of distinction within the document. Therefore, it's generally best to speak with your designer of your theme and inform them of the requirements you have. They'll usually provide quick solutions by providing the appropriate CSS as well as PHP codes that will work for the specific situation.

Method 3: Install the plug-in

However, it's likely that none of the techniques work, or may not work as well as you'd prefer. Think about activating and installing the WordPress Latest Modified Info plugin.

The plugin will take the guesswork out of this equation. It allows you to include the date changed the last time, modify the settings (like substituting the previous post date) and modify the appearance of the date and location.

The WP Last Modified Info plugin
It's one among the WP Last Modified Information plugin.

After it has been activated, go to Settings > Last Modified Details for WPin the WordPress dashboard. The page's Options Page, turn on the option "Enable for Posts and Pages" in the Frontend. "

Enable for Posts and Pages on the frontend
The possibility exists to permit Posts and Pages on the frontend.

Alternate the method used to show your information to:

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

Scroll to the bottom of the page for additional settings for:

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

It is important to save the settings in order to include the date of the latest update at the front of your page. If you notice things that don't look well, go back to your settings and see the alternatives that can fix the problem to what you'd like to view it.

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

The plugin automatically activates the last date for updates for all pages too. If you'd like to change the setting for this, go back to your settings within the plugin and fill in"Pages Post Types" in the " Post Types to display the latest details" area. Input "Posts" into the box to ensure that there isn't any change to the site's post type. After you've completed all the changes ensure that you hit the Save Settings button.

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

What's the most effective way to know the date the WordPress page or post was last updated?

The display of the latest updates date on the WordPress blog page is a crucial aspect. What can you do to find out what date a blog post has first was updated? This is the most important factor to establish the date on old articles that need to be altered.

Additionally, looking over the latest published and revised dates may help in determining issues you might have when you add the latest date. As an example, a majority of the code in this article needs the final date modified in order to pull. That means you won't find dates when the article hasn't been updated and it isn't found when you look to find it on the backend.

However, WordPress will not display the changed or the Last Updated date on the front page once you've added your blog posts or pages, regardless of having used one of the strategies which we've offered in the past. The page for a post, the page inside WordPress it will only show the day of publication column.

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

It is the same for editors for both of the pages, as well as the posts. You may check the tab for the post tab for the date of the publication date but not the exact date when that last edit was made.

Only the Published date gets shown by default
The day of publication will be displayed in the default.

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

With no assistance from this built-in feature, you need to open the blog post that you would like to edit, and then click on in the article tab, which is to the left. Look down for an edit button.

  • If you do not see any revisions button, that means that you've not updated the file.
  • If you can be able to see a revisions button, click on the button for revisions.
Click the Revisions button to view the list
Click the Revisions button to open the entire listing.

While this doesn't promise to find the exact day of the update it gives the reader an idea of the events on this post.

The revisions you have made are saved to WordPress regardless of whether or not you write the post. This means it's possible that you have revision logs that don't contain the most recent dates for updates. It's possible to go through the previous revisions to determine which ones you published the latest according to the information in the rev.

Every revision is recorded along by the date and time of the revision you are able to place bets on. It is the most recent date .

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

If you've used the most recent date-updated software in another method, but having trouble getting the display of the date in the frontend, it's a useful method of determining if the posting has updated dates initially, and if not it won't reveal something.

Additionally, you can use a plugin Locate the last update date on the Backend

The WP Last Modified Info plugin not only adds a Last Modified date to the frontend. It also adds sections and columns on the dashboard to make easy to search for posts which you haven't updated for some time.

After you've installed the WP Last Modified Info plugin and enabled, visit the post list on WordPress. The plugin will be able to automatically create an additional column beneath the date that is called "Last Modified".

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

This plugin adds an extra option to the editor, named Last Updated that shows the latest update date and the date of the particular post.

The Last Updated tab within the post editor
The tab for Last Updated is located in the post editor.

Summary

In this article we will discuss:

  • What can you tell us about the date that was the date that the site was changed?
  • Benefits of being able to show the latest dates for any changes on your site
  • What can I do to show the latest date in WordPress using these methods:
  • Method 1. editing functions.php and CSS within the theme
  • Method 2. Editing template templates to create themes
  • Method 3. Making use of the same plugin as WP Last Updated Information

We also discussed tips on:

  • How can you alter the appearance of the most recently modified date?
  • What can I do to remove the most recently day of the update on pages or other things that are part of a blog post.
  • Then, you are able to take out the date of publication in order to make sure that it's only the day on which the change in publication occurred.
  • Modify the location in which the most recent date appears on a webpage

At the end of the day, we demonstrated how you can add the latest date to several well-known themes, such as:

  • Twenty Twenty One
  • Astra
  • Neve
  • Zakra

Leave a comment in the comments section if you need any advice on how you can include the Last Date Updated in the pages of your WordPress website!

Spend less time, save money and increase the performance of your site

  • Support with instant help is offered by WordPress specialists in WordPress hosting at all times of the day.
  • Cloudflare Enterprise integration.
  • Global reach with 34 data centers across the world.
  • Optimization using our integrated Application performance monitoring.

The post first appeared here. here

This post was first seen on here