getignited
Member
Posted 2 years ago #
Hi there,
I've got a regular problem that I can't seem to solve regarding the date. If I make two posts on the same day, the older post will lose the date information, with it instead being shown on the newer post. Is there any way I can make the date show up on both posts, regardless of being made on the same day?
My blog can be found at http://getignited.co.uk/blog
Thanks
Try editing your theme files and changing all references for the_date() to the_time(). If you use the former, the full date is only shown on the first post on a given date. The latter shows the date irrespective of how many posts you publish on any one day
getignited
Member
Posted 2 years ago #
Ah, that's perfect thanks!
Could you share which file this change was made on so that I caqn change it. I am getting no dates, only time, on ALL posts. Or perhaps suggest anoither place for the error.
razor.harrison
Member
Posted 2 years ago #
The_date is only for THE FIRST post in a loop, and ignores all the rest. That's why you must use the_time.
This is applicable in single.php or any customised loop.
Khaled Hakim
Member
Posted 1 year ago #
This should help:
Instead of using
the_date();
Use the following:
the_time();
If you leave the brackets blank in "the_time" function, you will notice that you do not get a date stamp, but a time stamp. To get the date to show instead of the time inside "the_time();" function... use the below:
the_time('F j, Y');
You can find the_date(); in your template folder in one or many of the .php files. Simply replace where desired.
Cheers