Wordpress - Date vs Time function
Another thing I came across that I had to muddle through was styling a blog post's calendar for each post.
To do this, you should have the_time function and not the_date function. It turns out, the_date function is pretty stubborn and is meant to display only once - so if you have multiple posts per day and want to display the calendar date for each post, the_date function is not meant for you. (Not to mention, it's really stubborn when it comes to styling...).
So where does this leave you? The other function - the_time();
The_time(); is pretty flexible, if you want to ask me. You can style this puppy by breaking it down and putting classes and ids around it - making me one happy person (at least in this hurdle I had to jump through).
To do so, this is what I had to do. In the blog.php page we had, I put the following:
<div id=" blogPost_date">
<span class="month"><?php the_time('M');?></span>
<span class="date"><?php the_time('m');?></span>
<span class="year"><?php the_time('Y');?><span>
In the css side, the following:
#blogPost_date span { display: block; text-align: center; }
.month { font-weight: bold; font-size: 10px; }
.date { font-weight: bold; font-size: 24px; }
.year { background-color: #D60F14; font-weight: bold; color: #fff; }
And there you have it, I did some other stuff in the stylesheet, but these are the main ones I was going after. Hopefully this was helpful for those who were wondering how to separate and style each section of the date.