Hi – we migrated our site to your excellent NewsMag template a couple of days ago – all went smoothly and we’re thrilled with the result! Just one thing we need some help with… As a news site we want to include the post’s published date/time and also the date/time of any subsequent edits – as per the screen shot below. Can you help us with the necessary edits to the single.php file to achieve it? Thanks in advance! Plan to move another of our sites to the template in the near future – but it’s a bit more complex – so we’ll have a few questions for you first 🙂

Hi,
Sorry for the delay!
You can add last edited part like this: https://forum.tagdiv.com/topic/last-updated-date-instead-of-published-date/#post-30380
For the published part you can do this: http://screencast.com/t/SAxuDtpy4ryZ
Result: http://screencast.com/t/gQ1a13Ow19r
Thanks
Thanks Lucian – no problem with the ‘published’ date. We’ve added the following code to the loop-single.php file – but it’s not working for us 🙁 Any ideas?
<div class="meta-info">
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<p>Last updated: <?php the_modified_date(); ?></p>
<?php echo $td_mod_single->get_views();?>
<?php echo $td_mod_single->get_comments();?>
</div>
Hi,
You need to also add echo before the the_modified_date() function in order to be displayed, it should look like this:
<p>Last modified: <?php echo the_modified_time(); ?></p>
Ex: http://screencast.com/t/1bez2N08h
Result: http://screencast.com/t/8rlOH03r1T
Thanks
-
This reply was modified 11 years by
Lucian.
Strange… code in loop-single.php updated to:
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_views();?>
<?php echo $td_mod_single->get_comments();?>
<p>Last updated: <?php echo the_modified_date(); ?></p>
Cache emptied – but still not getting ‘last updated’ showing on individual post pages. Are we missing something obvious? 🙂
Hi,
Please make sure that you check for this changes to the same post template you are also doing this changes as there are 8 different post templates besides the default one and you need to make this changes to each post template file if you want this on every post template.
So please make sure you add this to loop-single file then check with the default post template.
Thanks
