I am in wordpress, attempting to format the date output. This is actually the code I am using at the moment:

<div class="date"><?php the_date('M, Y'); ?></div>

It's output appears like this:

MAY, 2010

What I wish to do is possess the date display such as this (The month on the top of the season):

MAY

2010

I am simply not familiar enough with PHP to obtain things working. An easy line break wouldn't quite be adequate because I wish to have fun with sizing, positioning of every individually (month text bigger compared to year text, both centered, etc.). Separate classes put on each could be ideal.

Really, a line break is a great place to start:

<div class="date"><?php the_date('M'); ?><br /><?php the_date('Y'); ?></div>

After which add more CSS when needed. For instance, should you adding div's, it might be apparent the line break will go away, since separate div's will break by themselves as lengthy because the display: property around the parent div (#date) is block.

e.g.:

<div class="date"><div style="something-special..."><?php the_date('M'); ?></div><div style="something-else..."><?php the_date('Y'); ?></div></div>

mmmm... Used to do more searching and, as i still don't understand how to obtain the "the date" function to show multiple lines properly, while using "timeInch function appears to complete exactly the same factor having to break. Here's the code I am using. Is effective.

<div class="month"><?php the_time(M) ?></div><br />
<div class="year"><?php the_time(Y) ?></div>

you need to have the ability to simply do

<?php the_date('M<b\r>Y')?>

or other tags ensuring you escape the figures listed here

<div class="date">
  <span class='month'><?php the_date('M');?></span>
  <span class='year'><?php the_date('Y'); ?></span>
</div>

After that you can set the spans to display: block if you would like these to each be by themselves line:

<style type='text/css'>
  .date span { display: block ; } 
</style>