• Is it possible Alphabetizing Posts by last name (Joe-first, Doe-last) in this case showing Joe Doe as is but organizing it by second entry in the post title(Doe-last)

    Usisng the code found in Alphabetizing Posts http://codex.wordpress.org/Alphabetizing_Posts is it possible to ad variants to render it properly organized by last name?

Viewing 3 replies - 1 through 3 (of 3 total)
  • If these are post titles, then not easily, no. The post title is stored as a single string, so, when sorted alphabetically, “Albert Smith” would be placed before “Bert Jones”.

    Thread Starter pablogt

    (@pablogt)

    Hi esmi, can we use a variant so Jones is reconized as before Smith?

    Not really without some coding. You’d have to put all your posts titles in a array and when putting them in the array, reformulate the title based on YOUR name requirement, then sort the array, then use that to display your posts.

    You might consider creating a Custom Field and put Jones, Bert in the custom field, then use the orderby=meta_value & meta_key=your name field arguments to do the query_posts().

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alphabetizing Posts’ is closed to new replies.