athenagold
Member
Posted 3 years ago #
Hello,
I'm customizing a blog and would like to have the date display in a box so that it is stacked like this:
JUL
07
08
I cannot seem to figure out how to do this. I tried this:
<?php the_date('M'); ?>
<?php the_date('d'); ?>
<?php the_date('y'); ?>
But it will only display the first one, Month.
Ideally, I'd like to just list them out in one call - <?php the_date('M d y'); ?> but somehow place spans between each one, so that I can style them in my CSS.
Any ideas?
Thank you!!
Allstar
Member
Posted 3 years ago #
Try using 'the_time()' for all 3.
Sounds silly but it works because the_date will only work once per post... :)
irishjayhawk
Member
Posted 3 years ago #
Instead of making another topic, I thought I'd bump this for a quick question.
I want to achieve the same thing but I DON'T want it to display on every post, but rather just the first one.
I'm using the_date(), but it won't display properly.
Try using 'the_time()' for all 3.
Sounds silly but it works because the_date will only work once per post... :)