Sorting posts by custom date fields (non standard date format)
You can add a posts_orderby filter to flip the meta_value: function wpse174075_posts_orderby( $orderby, $query ) { if ( $query->get( ‘orderby’ ) != ‘ddmmyy_date_format’ ) return $orderby; if ( ! ( $order = $query->get( ‘order’ ) ) ) $order=”DESC”; global $wpdb; $mv = $wpdb->postmeta . ‘.meta_value’; // Note SUBSTR() position (2nd) arg is 1-indexed. return ‘CONCAT(SUBSTR(‘ … Read more