Hi,
I am looking to display the time on a post (i.e: posted on April 30, 2017 @ 10:25:35 pm). I have formatted both date and time under Settings->General but in the post I still show only the date.
I checked the loop-single.php and changed to true the following statement <?php echo $td_mod_single->get_date(true); /?>
It does not display the time, I am still only seeing the date in te posts.
Can you assist
Regards,
KSangoyah
Hello ksangoyah,
If you want to change the post date format, you should edit the theme core file and add your desired date structure. For more information about this case, please consult the following topics here -> https://forum.tagdiv.com/topic/how-i-can-show-the-times-and-dates-in-posts/ and here -> https://forum.tagdiv.com/topic/changing-the-date-to-x-time-ago/
Thanks for the message!
Hi,
I have tried to update the loop-single.php by adding this code
<?php the_time(‘F j, Y g:i:s a’) ?>
after
<?php echo $td_mod_single->get_date(false);?>
Is there any get_time(false) type of code that I can use to have the time displayed in the post ?
Or can you tell me what theme core file should be updating for this matter?
Thanks
KSangoyah
Hello KSangoyah,
You should check the following topic here -> https://codex.wordpress.org/Formatting_Date_and_Time because it might be useful for you.
Thanks.
Hi,
I was finally able to tweek the code and time is displaying fine along with the date. I did changed <?php echo $td_mod_single->get_date(false);?> with <?php echo the_date(‘d F Y G:H:s A’); ?>, flushed teh cache and it’s working great.
Thanks for your time
KSangoyah