Are you struggling to show the last updated/modified date in Newspaper Theme? Don’t worry! In this article, I am going to share the ways to show “last updated date” in the newspaper theme and mobile theme.
Do you know? A newspaper theme is a popular WordPress theme used by many websites. I have also changed my theme from Generatepress to Newspaper for the case study.
It is very easy to show the last updated date in Generatepress. Yes, You can find the code in the support forum. Do you know? In Newspaper Theme, It is very easy to show the last updated via tagDiv composer.
The author implemented the inbuilt feature so you don’t need to use PHP code to show the last modified date in the newspaper theme.
If you are going to use the responsive version the newspaper theme for mobile then no issues but if you need to use the mobile theme separately available in the plugin section for speed and amp then you need to edit the mobile theme PHP file to show the last updated date in Newspaper mobile theme.
Note:- This method works perfectly on Newspaper 10.3.2 version. I will update this method when the theme new update causes any issues.
Step By Step Guide to Show Last Updated Date in Newspaper Theme
- Login into your WordPress admin panel
- Open any article
- You can find the “Edit Template” option on the topbar
- Edit Template will open the tagDiv Composer where you have to search “Single Post Modified Date” via Add Element.
- Simply drag and drop the “Single Modified Date” below the post title and save the changes you have made.
- That’s it guys, You have successfully done the work. Open any one of the article to see the changes.
I suggest you use the tagDiv composer method to show the last modified date instead of using the code because it is very easy.
To show the last modified date on all blocks you have to enable the option. For that, navigate to
Newspaper->Theme Panel->Block Settings->Meta info on Modules/Blocks-> Show Modified Date
Enable that option. The theme will show last modified date in all blocks.
Show Last Updated Date in Newspaper Mobile Theme
If you want to increase the speed of the website in Newspaper theme then you can use their mobile theme which is come with the theme itself.
Just you have to activate the mobile theme via “Newspaper->Plugins”. The above method will only work for desktop version and responsive mobile version.
To display the last updated date in Newspaper mobile theme you have to edit the code. Follow the procedure I have mentioned below.
- Goto the “wp-content->plugins->td-composer->mobile->single.php“
- In single.php file find the below code.
<?php echo $td_mod_single->get_date(false);?>
- Replace the above code with the below code I have mentioned
<!-- date --> <span class="td-post-date"> Last Updated: <time class="entry-date updated td-module-date" datetime="<?php echo esc_html(date(DATE_W3C, get_the_modified_time('U'))) ?>" ><?php the_modified_date(get_option('date_format')) ?></time> </span>
- Finally, update the file. That’s it, guys. Once you have updated the Newspaper theme then there may be a chance the file gets updated so make sure the last updated date shows after the update.
- If not then you have to edit the code again.
Thanks for the code -> thewordcracker.com
As I have mentioned I have switched to Newspaper Theme for case study. Everyone should need to share the information to help others. I did a lot of research to show the last updated date in Newspaper mobile theme but I couldn’t find any useful resource.
That’s why I have decided to post this article in my blog to help other who are looking for the same solution.
I hope this article helps you to show the last updated date in Newspaper theme both on desktop and mobile version. If you face any issues comment below. I am happy to help you. Share this article to help others.