Hi,
Newspaper theme allows it to display the date of last publication of an article?
I tried to insert this code in the single.php file, but it does not work …
<?php
define (‘DELAY_POST_UPDATE_DISPLAY’, 3); // On affiche la date de dernière révision seulement si celle-ci est antérieure de 3 heures à la date de publication
// Si l’article a été modifié, un autre jour ou alors au moins 3h après dans la même journée
if (get_the_modified_date() != get_the_date() || get_the_modified_time(‘Gi’) – get_the_time(‘Gi’) >= DELAY_POST_UPDATE_DISPLAY * 100) :
?>
<p>Date de dernière mise à jour : le <?php the_modified_date();?> à <?php the_modified_time();?></p>
<?php
endif;
?>
Hi,
Add this code: http://pastebin.com/5pW49CTC inside the loop-single.php file, like this: http://screencast.com/t/QtyVPR3Z5AKg
Result here: http://screencast.com/t/8waQb0kAYit
Thanks
-
This reply was modified 11 years by
Lucian.
Hi,
This post is 2 years old. The screenshots do not work anymore and the code will not work as well because the theme was updated many times since then. You can follow this topic to see how you can add the modified time/date:
https://forum.tagdiv.com/topic/how-to-add-last-updated-time/
Thank you!
In case someone is looking for a solution still, then this should help :
I’ve implemented the how to display last modified time instead of published time on my blog http://www.techbuzz.in and also I’ve blogged about the same.
However, the effect of this has to be studied when NewsPaper theme is updated.
I’ve written about the benefits and problems with implementing ‘last_modified_time’.
http://www.techbuzz.in/tagdiv-newspaper-theme-last-updated-modified-time.php
Bloggers should use this feature cautiously as mis-using it might attract penalty from Google.
Hope this helps.