Get_author_profile plugin in a loop?
-
I am interested in making a Contributors page that lists all users who have written entries (either posts or pages), giving basic information such as their email, website, and profile but not their posts. (But it would be nice to have the author’s name link to the corresponding author.php page.) I can see that the Get Author Profile plugin would be perfect for this, but is there some way to get it to run in a loop instead of having to write the same code over again for each author? Something along the lines of:
<div class="profile">
For each author, do these steps
<ul>
<li id="myprofile">Blog Owner:
<ul>
<li><?php author_profile('firstname'); ?> <?php author_profile('lastname'); ?></li>
<li>ICQ: <?php author_profile('icq'); ?></li>
<li>AIM: <?php author_profile('aim'); ?></li>
<li>Notes: <?php author_profile('profile'); ?></li>
</ul>
</li>
</ul>
until there are no more authors left
</div>
(The code is taken directly from the plugin author’s site:
https://guff.szub.net/2005/01/31/get-author-profile/) If it was in a loop that executed the code for each author found, then the code would not have to be changed every time a new author was added. If I’ve got the general idea right, could someone come up with the actual code?
- The topic ‘Get_author_profile plugin in a loop?’ is closed to new replies.