I am building a theme, and I am trying to make it so that it displays a date in a certain way (see image), but Im not sure how to do it. I went to the php date library thing, but there is no lower case 3 letter months. How can I accomplish this? This is the php code for date in wordpress <?php the_date(); ?> PHP: Thanks Nick
I don't use WP, but in php you can display 3 letter months using "M" as formatting. <?php echo date("M"); ?> To get it to lower case you could use built in strtolower funktion: <?php echo strtolower(date("M")); ?> Does this help or is it totally diferent in WP?
well, I was using the M thing, and this is what I had <span class="post-month"><?php the_time('M') ?></span> <span class="post-day"><?php the_time('d') ?></span> PHP: It displays it the way i needed it to display, but it just has Dec capitalized. Am I allowed to put <?php ?> in side of <?php ?> Like if I do <span class="post-month"><?php the_time('<?php echo strtolower(date("M")); ?>') ?></span> <span class="post-day"><?php the_time('d') ?></span> PHP: would that work?
I don't think that nesting another php tag inside would work. I would need to take a look at the_time() WP function to see what it does... I will reply here soon if i find anything...
Try wrapping a strtolower call around the_time function, something along this lines: <?php echo strtolower(the_time("M")); ?> Try it with and without echo. The only problem would be if the the_time() echoes its output directly. http://wordpress.org/support/topic/135690
That didn't work. Thanks for trying though. I just figured out how to do it. I used css and style post-month to have text-transform:lowercase; and it worked. Thanks a lot for your help. Nick