How to show the last updated date on the Newspaper 11 theme

The newspaper theme by tagDiv is one of the most popular WordPress themes till date. With over 124,435+ sales NewsPaper theme flaunts 4.82 stars on Envato Market.

Newspaper theme by tagDiv shows the first published date on posts and home page by default. But have you ever wondered if you would be able to show the last updated date on the Newspaper theme?

Do not worry if you want to display the last updated or modified date on your posts in the Newspaper theme then you are at the right place.

Why show the last updated date on the Newspaper theme?

The newspaper theme by default shows the first published date. That means even if you update the posts time and again the published date won’t be updated, which I personally think is uncool.

Google and your audiences both love updated content and they should know that you have updated your content. You might have seen while searching queries in google that published dates are shown below the title of the posts. Although you update the contents of your website time and again, Google will still show the old date (first published date) so, to remove this and flaunt your updated date you need to show the last updated date on your Newspaper theme.

Google results showing published/updated date on SERP.
Google results showing published/updated date on SERP.

If you want to get the last updated date on your WordPress posts powered by a newspaper theme then you need to make some tweaks to your newspaper theme files.

Before proceeding to the tutorial I want you to have your website’s complete backup because if you make certain errors while changing the theme files your website may break down.

If you want cheap and awesome hosting that offers automatic daily backups and a one-click restoration of your whole website if anything goes wrong then I have a great deal for you. You can check the deal here.

P.S: This tutorial is checked with Newspaper 11 Version 11.3.1. If you have a different version, the overall process will be the same but the codes might be at different lines.

So, let’s get started.

This tutorial will have two steps. One to show the last updated date on “Posts” and the other to show the last updated date on the “Homepage” of the newspaper theme.

Show last updated date on posts

In the first phase of this full tutorial, we will be editing a file called td_module_single_base.php

  • From the left side of your WordPress dashboard go to Plugins >> Plugin Editor
  • From the “Select plugin to edit” option select the “ tagDiv Composer” plugin.
tagDiv composer
Opening tagDiv composer through plugin editor.
  • After that, from the plugin files go to legacy >> common >> wp_booster >> td_module_single_base.php
  • Now, around the line 332 you will see some code like get_the_time(get_option(‘date_format’), $this->post->ID) . ‘</time>’;
td_module_single_base.php
Editing td_module_single_base.php
  • In the above code change the “get_the_time” tag to get_the_modified_time”.
Adding get_the_modified_time in  td_module_single_base.php file.
Adding get_the_modified_time in td_module_single_base.php file.
  • Now click “Update File“.

So, this is it. You have successfully shown the last updated date on your posts.

Show the last updated date on the homepage.

The above-discussed method works inside the posts only, which means, you will see the last updated date only inside individual posts. You won’t see the last updated date on the home page for the same post.

So, if you want to show the last updated date on the homepage too, then you need to add this step additionally. 

To show the last updated date on the homepage of the newspaper theme, the steps are similar as above but the file we are going to edit will be different.

In the final phase of this tutorial, we are going to edit a file called td_module.php

  • From the plugin files go to legacy >> common >> wp_booster >> td_module.php
  • Now around the line 206 you will see similar code like $display_date = get_the_modified_time(get_option(‘date_format’), $this->post->ID);
Editing td_module.php
  • In the above code change the “get_the_time” tag to “get_the_modified_time”.
 Adding get_the_modified_time in  td_module.php file.
Adding get_the_modified_time in td_module.php file.
  • Now, click “Update File“.

So, this is it. You have now successfully shown the last updated date on the homepage too.

In conclusion, to show the last updated date on the newspaper theme you need to follow a two-phased tutorial which includes changing theme files i.e. td_module_single_base.php and td_module.php. After, changing both the files step-by-step as above; you will have an updated date on your posts and home page in your newspaper theme.

If you have any further questions regarding this topic, feel free to ask me in the comment section and I will reply to you as soon as possible.

ATTENTION!

If you edit the theme files of the latest Newspaper theme it will prompt its popup on your website that will cover all your content which says “The newspaper theme license key is not registered on this website.” To remove thins you need to reset your newspaper license and again enter it from Newspaper >> System Status >> Registration Key.

Newspaper’s prompt after editing theme files.

Also Read: How to show last updated date on GeneratePress theme

FAQ’s

How do I show the modified date in a newspaper WordPress theme?

You can show the modified date in a newspaper WordPress theme by editing the “td_module_single_base.php” file inside the “tagDiv composer” plugin.

How do I show the last updated date of posts instead of published date?

To show the last updated date instead of the published date in the Newspaper theme you need to change the “get_the_time” tag to “get_the_modified_time” in the “td_module_single_base.php” file.

WP Rocket - WordPress Caching Plugin

2 thoughts on “How to show the last updated date on the Newspaper 11 theme”

  1. Hi there! Do you have updated instructions for how to update the date on posts for websites using Newspaper 11.5.1 themes? I tried this with my Newspaper theme and it unfortunately didn’t work. Thank you!

    Reply
    • Hello Shani Whisonant!

      I just tested on my another website which is using Newspaper 11.5.1 and this process works perfectly fine.

      Please, go through the tutorial once again and let me know if you get stuck somewhere.

      Reply

Leave a Comment