Thursday, October 7, 2010

TutZone- Tutorials, Design news and Inspiration

TutZone- Tutorials, Design news and Inspiration

Link to TutZone

How To List All The Authors From Your Blog

Posted: 07 Oct 2010 05:53 AM PDT


For multi-authored blogs, it is useful if they list all their authors, so that their readers can follow any specific author. Also it helps you to show all your readers, as to how much a articular author is contributing to your blog. With this simple hack you can display all your blog authors at any specific page or post. Hope this helps.

Procedure:

Note: Do take backup of your theme before you try this.

01. Just Add below code where you want to display all your authos:

<ul>
<?php wp_list_authors('exclude_admin=0&optioncount=1&show_fullname=1&hide_empty=1'); ?>
</ul>

Few things to understand here if you want to tweak it a bit.

exclude_admin: 0/1
Use 0 if you want to include the admin's name in the authors list and 1 to exclude it.

optioncount: 0/1
Use 0 if you want no post count to be shown and 1 if you want to display.

show_fullname: 0/1
Use 0 if you want to display first name only and 1 if you want to display full name of the author.

hide_empty: 0/1
Use 0 to display authors with no posts and 1 to display authors who have one or more posts.

This concludes this simple and useful tutorial. Hope you like it.

Source

No comments:

Post a Comment