Sort posts by first letter in the title, not by first number
This is a bit messy to do in MySQL, given the lack of a preg_replace – the following uses a nested REPLACE to strip all numbers from the title: function wpse167989_posts_orderby( $orderby, $query ) { global $wpdb; // Strip all numbers from title, and trim any leading spaces. return $wpdb->prepare( ‘LTRIM(‘ . str_repeat( ‘REPLACE(‘, 10 … Read more