• I would like to create a piece of code that loops through each Author in my WordPress blog.

    I’m a complete novice with PHP, but basically I want to list all of the Authors in an unordered list, with their Photograph, and then their name. Both the photograph and the name need to be a hyperlink that points to the Author page.

    I’ve worked out how to display a single Author’s photo. It is as follows (the $user variable is the Author ID)
    <?php userphoto_thumbnail($user, ' ', ' ', array(style => 'border:0')) ?>

    From previous research, it seems that this is how you list all Author usernames as a list of hyperlinks to their respective pages, though I don’t think it’s going to help me in this instance

    <?php wp_list_authors('exclude_admin=0'); ?>

    Could anyone help me write the loop code, pretty please?

  • The topic ‘Create a loop in PHP to display details for each author’ is closed to new replies.