Order by custom date field
I found the following solution: SELECT wposts . * FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = ‘datum’ AND wposts.post_type=”optredens” AND wposts.post_status=”publish” ORDER BY wpostmeta.meta_value ASC As other query_posts() methods / alternatives did not work very well.