WordPress Orderby Last Word In Title

Try this. First add the following orderby filter in functions.php function posts_orderby_lastname ($orderby_statement) { $orderby_statement = “RIGHT(post_title, LOCATE(‘ ‘, REVERSE(post_title)) – 1) DESC”; return $orderby_statement; }