Articles in this series

51 Responses

  1. techiezone
    techiezone June 9, 2008 at 9:08 pm | | Reply

    I have done exactly what you have told here. But when I publish the page, I just get the Author as page title and nothing is shown…

  2. techiezone
    techiezone June 9, 2008 at 9:25 pm | | Reply

    Justin it does show other authors detaisl except admin. And I am admin here. I created a new user with riole as author and it is showing the detaisl on the page.

  3. BoltClock
    BoltClock June 9, 2008 at 10:04 pm | | Reply

    You continue to rock all the time. I’m sure Project M will be the next big WordPress thing soon at this rate.

    I don’t think I’ll be making use of this technique anytime soon though. I don’t yet run a multi-author blog, but if I do launch a webcomic with my friend sometime later this year or the next, this will definitely come in useful.

    Bookmarked in del.icio.us!

  4. IndieLab
    IndieLab June 10, 2008 at 7:30 am | | Reply

    Great tutorial. I run a multi-blog site and I was just thinking of how to display “The Team” that’s behind the site. Now I know, thanks!

  5. J Mehmett
    J Mehmett June 10, 2008 at 10:14 pm | | Reply

    Thanks Justin, very useful tutorial. I was eagerly following the series “Doing more with Gravatars” and found them really helpful.

    I’m planning to run a multi-author blog next year and this will be a great reference.

    $curauth = get_userdata($author);

    Loll, so do you mean I can display the entire profile contents? Can I add additional hooks such as author posts and author comments on that certain blog?

  6. J Mehmett
    J Mehmett June 12, 2008 at 7:06 am | | Reply

    Justin, I like your ideas, man.

    The only limit of Implementing Gravatars with WordPress theme might be the sky limit.

  7. Jenny
    Jenny June 12, 2008 at 6:22 pm | | Reply

    nifty. i’m gonna try this out.

  8. techiezone
    techiezone June 12, 2008 at 6:56 pm | | Reply

    Thanks a lot Justin.

  9. Thomas Clausen
    Thomas Clausen June 13, 2008 at 2:25 pm | | Reply

    Does it matter if I created all the users, because I’m just getting my own picture + bio as many times as I have authors.

    Other than that, it seems cool :-)

  10. June 14, 2008 at 12:51 am | | Reply
  11. Patrick Sweeney
    Patrick Sweeney June 15, 2008 at 10:42 am | | Reply

    Great tutorial, I just found your site and will definitely be coming back….I really like your writing style.

    I am going to add a link to this article and your site on my blog.

  12. June 24, 2008 at 6:18 pm | | Reply

    I think there is an extra “=” in the line below:

    “// If user level is above 0 or login name is “admin”, display profile”

    I removed it and then the admin author showed up for me.

  13. ovidiu
    ovidiu August 13, 2008 at 4:56 am | | Reply

    this is an awesome tutorial, but I am using the register plug plugin to extend the user fields, maybe you can show us also how to get those fields into the authors page too? http://wordpress.org/extend/plugins/register-plus/

    Also a little help to get some stats about a user would be great, either using built in wp functions, i.e. numer of posts written, or number of comments , anything you can think of. otherwise maybe combining this with the wp stats plugin of lesterchan? http://lesterchan.net/portfolio/programming/php/#wp-stats

  14. Christopher Anderton
    Christopher Anderton August 14, 2008 at 6:51 am | | Reply

    There are also another way to show a avatar without using the Gravatar service.

    <img src="/wp-content/themes/yourtheme/avatars/.jpg" height="95" width="95" alt="" />

  15. Christopher Anderton
    Christopher Anderton August 14, 2008 at 6:55 am | | Reply

    Addenum. The avatar file must be named exactly the same as the user login name.
    The PHP code was stripped in my last comment.
    See: http://www.matblogg.se/avatar_local.jpg

  16. Joseph
    Joseph September 17, 2008 at 11:06 am | | Reply

    This is fantastic!

    I’ve implemented this successfully, but i’m listed right at the top (because i’m the admin). Is there anyway for the admin to be listed with the other authors alphabetically?

  17. cyberfly
    cyberfly October 5, 2008 at 8:48 pm | | Reply

    hi..i cannot find any page templates section..just page parent on top of page order

  18. vil
    vil October 30, 2008 at 7:35 am | | Reply

    nice tutorial. Thank you very much..

  19. Travis
    Travis January 12, 2009 at 3:15 pm | | Reply

    Hey Justin,
    Quick question…..how would you go about excluding the “admin” user from your query? I don’t mind showing people with admin privileges, but just want to hide the one “admin” user.

  20. Ari Perry
    Ari Perry January 29, 2009 at 12:59 pm | | Reply

    Great Work,
    you have been a saviour a few times…

  21. Mike
    Mike February 18, 2009 at 1:48 am | | Reply

    @Travis

    I am also wondering the same thing. What I did try dident work. I am not a progammer so I am thinking there has to be a relatively easy solution.

    By the way thanks for a great tutorial, I searched high and low for something that would explain the author page. I was able to get the job done with this. Now if I can only get a couple of authors to join…

  22. Travis
    Travis February 18, 2009 at 1:54 am | | Reply

    @Mike

    The solution I came up with was simply deleting the “admin” user altogether. You can do this if you have and are logged in as any other user.

    Give that a try, if you don’t require an admin user.

  23. Mike
    Mike February 18, 2009 at 7:18 pm | | Reply

    Thanks for the idea. I dident know you could remove the admin, but when you think about it, who really needs an admin? Why bother with two accounts, when you can just have your own account with admin privileges.

  24. Andrea
    Andrea February 23, 2009 at 12:10 pm | | Reply

    Quick question: Would this exclude those set to ‘contributor’ as they do not have author privileges? I need to include both authors and contributors and treat them both as authors for the purpose of the author page. The only difference between them, for our site’s purposes, is editorial review prior to publishing.

    Thanks for the clarification.

  25. Andrea
    Andrea February 23, 2009 at 12:13 pm | | Reply

    Oh, and thanks for the tutorial! This is going to come in handy. :)

  26. bitkahuna
    bitkahuna February 26, 2009 at 9:12 pm | | Reply

    Travis, you can also fix this by editing one line of code:

    change:

    if($curauth->user_level > 0 || $curauth->user_login == ‘admin’) :

    to:

    if($curauth->user_level > 0 && $curauth->user_login != ‘admin’) :

  27. Katherine
    Katherine April 12, 2009 at 12:15 pm | | Reply

    Thanks for this.

    Just a tip to anyone who wants to exclude not only the admin user but also certain specified other users too (as I did). You can do this by amending the query as below, entering an array of user ids to be excluded:

    $query = “SELECT ID, user_nicename from $wpdb->users WHERE ID NOT IN (1,19,23) ORDER BY user_nicename”;

  28. Stefan
    Stefan April 19, 2009 at 10:40 am | | Reply

    hi,
    i have a problem i would like to show just one author and not a list of authors…how create this ?? can i delete the loop (foreach)?? and i would like to display extra fields with the plugin register plus can you help me…

    stefan

  29. Paul
    Paul June 5, 2009 at 1:22 am | | Reply

    This is great.

    But I cannot get pagination to work. So there is just too many authors on one page.

    Is it too much trouble for you to post the code that would get the All Authors template to use the same pagination as normal posts.

    Thanks

  30. neuville
    neuville June 21, 2009 at 6:47 am | | Reply

    Nice hack, thank you.

    I’m using it on my website, just a question: since I have more than 500 users, is there a way to paginate them?

    Thanks again for the hack,
    ciao!

  31. Max
    Max June 23, 2009 at 4:53 am | | Reply

    Hi Justin,

    thanks a lot for this great script. Could you please also explain how to add pagination to it?

    The thing is that I have hundreds of authors, and it is not very handy to display them all on one page. Thanks a lot in advance for your reaction.

  32. Samantha Armacost
    Samantha Armacost August 14, 2009 at 2:02 pm | | Reply

    I have been scouring the internet for this exact post. I was just about to break down and try to code my own “authors loop,” thanks so much for this very useful bit of code!

  33. Mathias Jespersen
    Mathias Jespersen September 1, 2009 at 6:58 pm | | Reply

    @Justin, great author template – just what I was looking for.

    @Katherine – very nice tweak indeed.

    Thank you all.

  34. annaba1
    annaba1 September 21, 2009 at 2:42 pm | | Reply

    Hi! This is very useful! Thanks!
    Just a question… Is it possible to order the authors by last name? I tried to use
    “ORDER BY last_name” but it don’t work…

    Thank you

  35. Jovan
    Jovan October 5, 2009 at 8:52 pm | | Reply

    Is there a way to order by AIM, as well? I’m thinking not, because I’ve checked my database and there’s no clear field where that content would be..

  36. Lisa
    Lisa November 20, 2009 at 3:23 am | | Reply

    Great tutorial. Is there anyway to add this to a current page under the content?

  37. Deepesh Divakaran
    Deepesh Divakaran February 4, 2010 at 1:41 pm | | Reply

    That was an awesome tutorial. Very well written. I made an authors page for my site, I was not sure how to get the templates working, and this helped me out.
    Thanks a lot again.

  38. dylan
    dylan March 8, 2010 at 2:06 pm | | Reply

    Hi,

    I got this working but I was wondering if there was a way to display an author page where the user had posted to certain categories.

    Cheers

  39. Sasa Stefanovic
    Sasa Stefanovic November 30, 2010 at 6:31 am | | Reply

    Easy one for me, and i put randomly generated list by editing db query, so instead of “ORDER BY user_nicename” i put “ORDER BY rand()” and that’s it. I have one question, and that’s how can i get in author list number of posts by author. I can do this on single page on author box, and on author page (like site.com/author/foo) but here i cant get it to work.

  40. Andy
    Andy December 9, 2010 at 8:53 pm | | Reply

    Thanks heaps for this Justin.

    Perfectly explained…clearly and simply!

  41. Dennis
    Dennis February 8, 2011 at 1:32 pm | | Reply

    Just what I was looking for. I am pretty new to Wordpress and this really helped me find a solution fast. YOU ROCK!

  42. Samuel
    Samuel July 18, 2011 at 3:35 pm | | Reply

    Thank you for the code, it is excellent. I am trying to get this to sort the users by last name, but whenever I change user_nicename to last_name it fails. Any thoughts?
    By the way, I get an error page when I try to access your forum.

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.