sorting by custom field date
-
Hi all,
I want to show 3 posts that appear today or in the future.
My dates are stored as Y/m/d (so yyyy/mm/dd eventually).I’m getting a rather random result right now, using:
$today = date('Y/m/d'); $args=array( 'post_type' => 'Kalender', 'meta_key' => 'datum', 'meta_compare' => '>=', 'meta_value' => $today, 'orderby' => 'datum', 'order' => 'desc', 'nopaging' => true, 'showposts' => 3 ); $wp_query = new WP_Query($args);
Any thoughts?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘sorting by custom field date’ is closed to new replies.