I have a weblog setup where each post has two authors and each author is represented by two custom fields (4 fields total: first_name_A, last_name_A, first_name_B, last_name_B). I’d like to be able to make a list of all the authors who have contributed in my archives page sorted alphabetically by last name, each author name being linked to the post(s) he or she has authored. It should look something like this, a simple list (which is harder to get then it first seems):
David Apple
July Child
Sarah Connor
Emily Kane
Erin Song
John Zerb
In cases where an author has contributed multiple posts (i.e. when the first and last name of an author show up twice in the database) I’d like to show the dates of those posts and use those to link to the posts, rather than the author name. E.g. if July Child had two posts the list would look like this:
David Apple
July Child
- July 3
- July 9
Sarah Connor
Emily Kane
I can’t get regular weblog tags to cut it because it will sort entries on a post-by-post basis, not authors (custom fields) on an author-by-author basis, so it can’t get the whole list alphabatized correctly. Ordering a weblog tag by author last name shows a list like this:
John Zerb [author A post 1]
David Apple [author B post 1]
Sarah Connor [author A post 2]
Emily Kane [author B post 2]
Erin Song [author A post 3]
July Child [author B post 3]
Any clues on how to set up a custom query to work this would be greatly, truly appreciated.