WordPress.org

Ready to get started?Download WordPress

Forums

get authors (17 posts)

  1. stew
    Member
    Posted 10 years ago #

    doesn't
    [code]<?php get_authors(' '); ?>[/code]
    not still work?
    I thought it did

  2. lennart
    Member
    Posted 10 years ago #

    Oops. Then its implemented in 1.0. Maybe I should have posted my code earlier...
    Thanks stew!

  3. Ryan Boren
    WordPress Dev
    Posted 10 years ago #

    Unless I've forgotten how to use grep, there is no get_authors that ships with WordPress.
    lennart, I changed your get_authors slightly. It now uses $siteurl/$blogfilename and get_usernumposts(). You can see the changes here.
    I added this to an authors.php file and added a rewrite rule to make it available via a cruft-free URL: /authors/.
    Something I would like to do is provide a search by author nickname rather than ID so that we could do something like /authors/ryan/. We would probably need to add an author_nicename field like we do with category_nicename. Hmm, I might implement this today, assuming I can finish some other coding chores for the wage-paying day job.
    Ryan

  4. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    *cough* post to wiki.

  5. NuclearMoose
    Member
    Posted 10 years ago #

    *cough* allusion *cough* work on code.
    *cough* Craig *cough* Cena * nag people about adding code to Wiki! :)
    Craig.

  6. Cena
    Member
    Posted 10 years ago #

    *cough* *COUGH COUGH COUGH*
    <--has the flu and therefore has been much less active of late.

  7. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Awww feel better!

  8. lennart
    Member
    Posted 10 years ago #

    Allusion: *cough* will do. As well as my other post...
    rboren: thx and nice idea, I will try it out after I get home from work

  9. lennart
    Member
    Posted 10 years ago #

    I updated your version a bit, rboren.
    It now does not show links for users who did not post anything yet. The source code is here.

  10. Ryan Boren
    WordPress Dev
    Posted 10 years ago #

    Good stuff. Perhaps we can get this and clean author URLs in 1.1, assuming Matt doesn't have a coughing fit in response to the suggestion. :-)

  11. omgwtf
    Member
    Posted 10 years ago #

    This hack is very neat :D
    It'd rock if it'd show their profile instead of their posts. ..or maybe both?

  12. benrad
    Member
    Posted 10 years ago #

    There are 3 people on my blog, and they each have their own little info box. I was wondering if I could work this hack so I could turn their names into links so if you clicked on the name it would show all their posts. It seems like it would be easy...I'll play around with it.

  13. wyk
    Member
    Posted 10 years ago #

    Cool hack.
    How would you change the code so that it would show the first and last name instead of the nickname? My blog has alot of authors.
    Thanks.

  14. mhjb
    Member
    Posted 10 years ago #

    Bring on the profile-showing version!
    Is the profile accessible anywhere in WP at all at the moment (apart from where you fill it in)?

  15. nightbird
    Member
    Posted 10 years ago #

    mhjb, take a look at this thread:
    http://wordpress.org/support/10/1793

  16. lennart
    Member
    Posted 10 years ago #

    Promised, I will add the user pref display in the hack this weekend.
    spiker: Put this in your index.php at the end where the search is and everything else and copy the get_authors.php stuff in your my_hacks.php

    <li><h2>Personen</h2>
    		<?php get_authors(false); ?>
    	</li>
  17. aimeec
    Member
    Posted 10 years ago #

    I'm new at this. But just a question, can I put the function call (function signature) anywhere in index.php? or is there a specific line for this? Again, thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.