Hello :)
I would like to display the months in three digits.
I.e. MAY - APR - SEP instead of having the whole month name displayed (in order to display it into a small graphic calendar).
Is there a way to do it ? Has it already been done ? Does a reference exist for it ?
Thank you very much in advance :)
http://php.net/date
Is that any good? M is the code to make three-letter month codes. So you'd do something like
the_date('M');
It's case-sensitive though.
WordPress has a calendar built in, you know. The template tag is <?php get_calendar(); ?>.
forceagainstsomething
Member
Posted 6 years ago #
Go to the options menu, and then down to "Default date format", and change the value to 'M j, Y'. Minus the quotes of course.
Thank you very much :) The 'M' works perfectly !
Have a wonderful week-wend.
I'm glad it works for you :) If you wanted to make it all caps, you can use CSS, the rule is
.whatever-selector-youre-using {
text-transform: uppercase; }
Hello, it's me again :)
I've just tried out the M trick with the french version of WordPress, but it doesn't seem to work as my June month (juin) appears entirely (4 digits).
Any idea of what I may be doing wrong ?
Thanks !
Well I did find the solution by myself. In fact WordPress is very intelligent ;) (more than myself, lol)
The months june and july (respectively Juin et Juillet) do have the same first 3 digits. They need the 4th digit in order to establish a differenciation.