Playing with author feature in Wordpress and author plug-in list
If you have a wordpress blog with one or more author, then it is most important to list author details in the wordpress post pages. The followings functions will help you list out author details such as
- the_author
- the_author_description
- the_author_login
- the_author_firstname
- the_author_lastname
- the_author_nickname
- the_author_ID
- the_author_email
- the_author_url
- the_author_link (Version 2.1)
- the_author_aim
- the_author_yim
- the_author_posts
- the_author_posts_link
- wp_list_authors
Okay, will discuss in detail below,
the_author
Description: it displays Author’s ‘Public’ Name
Syntax: <?php the_author(); ?>
Example: <p> this post was written by <?php the_author(); ?></p>
the_author_description
Description: Displays the contents of the about yourself field in an author’s profile (Administration > Profile > Your Profile). About yourself is a block of text often used to publicly describe the user and can be quite long. This tag must be used within The Loop.
Syntax: <?php the_author_description(); ?>
Example: <p>Cindy biography: <?php the_author_description(); ?></p>
the_author_login
Description: This tag displays the login name of the author of a post. The login is also referred to as the Username an author uses to gain access to a Wordpress blog. This tag must be used within The Loop
Note: It’s usually not a good idea to provide login information publicly. But it can be used for some other purposes
Syntax: <?php the_author_login(); ?>
Example: <p>Author username: <?php the_author_login(); ?></p>
The_author_firstname, the_author_ lastname, the_author_ nickname
Description: The following tags display the name for the author of a post. The First Name field is set in the user’s profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Syntax: <?php the_author_firstname(); ?>, <?php the_author_nickname(); ?>, <?php the_author_lastname(); ?>
Example: <p>This post was written by <?php the_author_firstname(); ?></p>
the_author_ID
Description: Displays the unique numeric user ID for the author of a post; the ID is assigned by Wordpress when a user account is created. This tag must be used within The Loop.
Syntax: <?php the_author_ID(); ?>
Example: <a href="/blog/index.php?author=<?php the_author_ID(); ?>">View all
posts by <?php the_author_nickname(); ?></a>
the_author_email
Description: This tag displays the email address for the author of a post. The E-mail field is set in the user’s profile (Administration > Profile > Your Profile). This function must be used within The Loop.
Note that the address is not encoded or protected in any way from harvesting by spambots
Syntax: <?php the_author_email(); ?>
Example: <a href="mailto:<?php the_author_email(); ?>">Contact the author</a>
Secure your author’s email:
This example partially 'obfuscates' address by using the internal function antispambot() to encode portions in HTML character entities (these are read correctly by your browser). Note the example uses get_the_author_email() function, because the_author_email() echoes the address before antispambot() can act upon it.
Eg: <a href="mailto:<?php echo antispambot(get_the_author_email()); ?>">email
author</a>
the_author_url
Description: This tag displays the URL to the Website for the author of a post. The Website field is set in the user’s profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Syntax: <?php the_author_url(); ?>
Example: <p>Author's web site:
<a href="<?php the_author_url(); ?>"><?php the_author_url(); ?></a></p>
the_author_aim
Description: This tag displays the AOL Instant Messenger screenname for the author of a post. The AIM field is set in the user’s profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Syntax: <?php the_author_aim(); ?>
Example: <p>Contact me on AOL Instant Messenger: <?php the_author_aim(); ?></p>
the_author_yim
Description: This tag displays the Yahoo IM ID for the author of a post. The Yahoo IM field is set in the user’s profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Syntax: <?php the_author_yim(); ?>
Example: <p>Contact me on Yahoo Messenger: <?php the_author_yim(); ?></p>
the_author_posts
Description: Displays the total number of posts an author has published. Drafts and private posts aren’t counted. This tag must be used within The Loop.
Syntax: <?php the_author_posts(); ?>
Example: <p><?php the_author(); ?> has blogged <?php the_author_posts(); ?>
posts</p>
the_author_posts_link
Description: Displays a link to all posts by an author. The link text is the user’s Display name publicly as field. The results of clicking on the presented link will be controlled by the Template Hierarchy of Author Templates. This tag must be used within The Loop.
Syntax: <?php the_author_posts_link(); ?>
Example: <p>Other posts by <?php the_author_posts_link(); ?></p>
wp_list_authors
Description: Displays a list of the blog’s authors (users), and if the user has authored any posts, the author name is displayed as a link to their posts. Optionally this tag displays each author’s post count and RSS feed link.
Syntax: <?php wp_list_authors(‘arguments’); ?>
Example: <?php $defaults = array(
'optioncount' => false,
'exclude_admin' => true,
'show_fullname' => false,
'hide_empty' => true,
'feed' => ,
'feed_image' => ); ?>
By default, the usage shows:
* Does not display the count of the number of posts
* Excludes the 'admin' author from the list
* Does not display the full name (first and last) but displays the author nickname
* Excludes users with no posts
* No author feed text is displayed
* No author feed image is displayed
<?php wp_list_authors('show_fullname=1&optioncount=1'); ?>
Author image in every post – Plug in:
Description:
for more info and downloads:http://coffee2code.com/wp-plugins/author-images/












