My custom date field was working perfectly as a way of ordering items by a custom date. That is, until 2011, at which point it seems to be ignoring what the year is, so that Jan 2010 and Jan 2011 are muddled together, and so on. Everything is still in order as per the days and months, it's just that last years entries are now mixed in with them.
This is the code I am using for this function:
<?php $args = array( 'showposts' => 20, 'cat' => 99, 'meta_key' => 'date', 'meta_value' => $todaysDate, 'meta_compare' => '>', 'orderby' => 'meta_value', 'order' => 'ASC' ); query_posts($args); ?>
I've echo'd a few things to check that everything's okay, and all seems fine in what I've seen. For example here is an echo of $todaysDate:
And these are two dates which are currently showing side by side, even though the first one is obviously from 2010.
Does anyone know how to resolve this? Can there sometimes be problems with the way WordPress reads the date?