Custom Field Date to display as words.
-
Hi,
I have looked everywhere to find a bit of script that will change a date from a custom field in WordPress into a date like: January 25th 2009.
Firstly I have a custom field with a key of sdate. I enter the date in the format: 090125 (yymmdd) this value is 090125.
I am currently using the following to check if the meta is filled in and if so display the date.
<?php if((get_post_meta($post->ID, "sdate", true))) { ?> <p><span class="blue">Tour date: </span> <?php echo get_post_meta($post->ID, 'sdate', true); ?></p>
That pulls the date in fine as Tour Date: 090125 , however it doesn’t look very nice does it!
How can I separate the above out to display Tour Date: January 25th 2009
Any idea would be very welcome.
Thanks Jono
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Field Date to display as words.’ is closed to new replies.