Articles in this series

39 responses to “Doing more with gravatars: Authors template page”

  1. techiezone

    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

    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

    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

    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

    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

    Justin, I like your ideas, man.

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

  7. Jenny

    nifty. i’m gonna try this out.

  8. techiezone

    Thanks a lot Justin.

  9. Thomas Clausen

    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. trendminers
  11. Patrick Sweeney

    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. Create an Authors Template | blackleafmedia

    [...] one post I found, he describes how to create an Authors template. He shows how to use it to showcase multiple authors on a blog. He also shows you how to throw [...]

  13. EdWestin

    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.

  14. ovidiu

    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

  15. Christopher Anderton

    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="" />

  16. Christopher Anderton

    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

  17. Multiple Authors Bio Page - DIY Themes Forums

    [...] wondering if anyone could help out building a a Thesis Themed bio page for a multi-author blog. This looks like a great framework to start with, but obviously it needs to be styled to fit in nicely [...]

  18. Joseph

    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?

  19. cyberfly

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

  20. vil

    nice tutorial. Thank you very much..

  21. Travis

    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.

  22. BarCampSDK » Blog Archive » Getting a list of registered users on your blog

    [...] the function but decided against it.  Instead we decide to write our own .  Using some sample code from Justin Tadlock as inspiration we quickly wrote our own function to print out the list of [...]

  23. Ari Perry

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

  24. Mike

    @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…

  25. Travis

    @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.

  26. Mike

    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.

  27. Andrea

    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.

  28. Andrea

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

  29. bitkahuna

    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’) :

  30. Katherine

    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”;

  31. Stefan

    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

  32. Paul

    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

  33. neuville

    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!

  34. Max

    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.

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.

WordPress-o-Sphere

  • WordPress 2.8 – "Baker"
    WordPress 2.8 adds hundreds of bug fixes, adds cool functions for themes, boasts a new widget API, and makes custom taxonomies easy for end users.
  • WeRockWP
    WeRockWP recognizes and showcases the individuals who contribute much to the WordPress community. These individuals are called WordPress Rockstars.
  • wpazo
    The all-signal, no-noise, source for the best WordPress stuff.
  • BuddyPress 1.0 has arrived
    The long-awaited BuddyPress (a set of plugins that turns a WordPress MU install into a social network) has been officially released.
  • BuddyPress for WordPress (not MU) coming
    It looks like BuddyPress will also be released for normal WordPress installs (not just WPMU).