I have full names as title posts and want to order it by the surname.
How could i do this with wordpress?
in PHP it would be along the lines of -
SELECT * from posts ORDER BY SUBSTR(LTRIM(post_title), LOCATE(' ',LTRIM(post_title)))
current code getting people category is;
$args = array( 'posts_per_page'=>50, 'cat'=> '39,-41', 'orderby'=>'title', 'order'=>'ASC', ); query_posts($args);
how can i get that second word order?