How to display Modified Date in Newspaper WordPress theme

In Newspaper WordPress theme, the published date is displayed in single posts by default. There are multiple ways to display modified date or last updated date in Newspaper.

Display Modified Date (Last Updated Date) in Newspaper using tagDiv Cloud Library

It's very simple if you use the tagDiv Cloud Library which brings you over 600 already-built layouts and makes your website to stand out.

tagDiv Cloud Library
tagDiv Cloud Library. Currently more than 600 premade templates are available.

You can install the tagDiv Cloud Library plugin under Newspaper > Plugins.

If you installed and activated tagDiv Cloud Library, click on Cloud Templates on the Dashboard. Then, press the "Single" tab.

As of April 2019, about 57 predefined Single Post templates are available. You can load one of them and then customize it as you wish.

When you click on a template, you can see details on it. Pressing "Create Template" will load the template.

Once it's created, you can customize it with tagDiv Composer. Instead of the date element in the template, add the "Single Post Modified date" element from the tagDiv Composer.

tagDiv Cloud Library of the WordPress Newspaper theme

For your reference: For Blocks (single posts are also displayed using blocks on pages), please check this setting from theme panel:

Display modified date in Newspaper WordPress theme.

When you are editing a block in tagDiv Composer, activate the option shown below:

Newspaper - show modified date on blocks

Alternative method: Editing a theme file

If you decide not to use tagDiv Cloud Library, you can edit a theme file to show modified date on single posts.

※ 0603 Update: Newspaper has been updated recently and now the following method does not work any longer. Please refer to the following post if you want to show the modified post date without using tadDiv Cloud Library:

Please go to the /wp-content/themes/Newspaper/includes/wp_booster/ folder. You can use an FTP client such as FileZilla. Or if your site is hosted with Bluehost or other web hosting service which supports cPanel, you can use File Manager under cPanel.

When you are in the folder /wp-content/themes/Newspaper/includes/wp_booster/, open the file td_module_single_base.php[/pcode. And then, find the code below.

if (td_util::get_option('tds_p_show_date') != 'hide') {
                $td_article_date_unix = get_the_time('U', $this->post->ID);
                $buffy .= '<span class="td-post-date">';
                $buffy .= '<time class="entry-date updated td-module-date' . $visibility_class . '" datetime="' . date(DATE_W3C, $td_article_date_unix) . '" >' . get_the_time(get_option('date_format'), $this->post->ID) . '</time>';
                $buffy .= '</span>';

It's found on around line #317 in Newspaper version 9.7.1 (which is the latest version when this article is written.) The location may be different depending on the version you are using.

Please replace the 2nd line with the following:

$td_article_date_unix = get_the_modified_time('U', $this->post->ID);

Please replace the 4th line with the following code:

$buffy .= 'Last Updated: <time class="entry-date updated td-module-date' . $visibility_class . '" datetime="' . date(DATE_W3C, $td_article_date_unix) . '" >' . get_the_modified_time(get_option('date_format'), $this->post->ID) . '</time>';
// Reference: https://www.techrrival.com/last-updated-date-newspaper-theme/

This method is not so desirable because it's reset when the theme is updated. You can use a child theme. But I experienced a problem when the theme was updated.

For your reference, if you sign up for Bluehost or SiteGround web hosting service by clicking on the referral links contained in this article, I will be eligible to get some commission. However, I do not recommend a specific web hosting service just for commission. I have been using several web-hosting services such as SiteGround and Bluehost for over 3-4 years.

Most especially, if you sign up Bluehost's Shared Hosting service (which is cost effective) by clicking on this link, you can use it with US$1/mo off starting from US$2.95.

See Also...