Creating an Author Page for your Blog (WordPress) have multiple authors. Wouldn’t it be great if it can display a little info on the authors, along with their list of posts? I’ve created the page for a while for this site,  now just to share with the viewers. Here’s how I did it.

1. Create an author.php page. The page can simply be done by copying your existing archives.php page, and renamed it to author.php
2. Sample code below. Change the layout as you like to match with your blog’s theme.

<div id="content">

	<div id="left-col">
	  <div class="post">

	  <!-- This sets the $curauth variable -->
	  if(isset($_GET['author_name'])) :
	  $curauth = get_userdatabylogin($author_name);
	  else :
	  $curauth = get_userdata(intval($author));

	  <h3>About: <?php echo $curauth->display_name; ?></h3>

          <a href="<?php echo $curauth->user_url; ?>">
	  <?php echo $curauth->user_url; ?></a></p>

          <?php echo $curauth->user_description; ?></p>

	  <h3>Posts by <?php echo $curauth->display_name; ?>:</h3>
	    <!– The Loop –>
	    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
			<em><?php the_time('M jS, Y') ?></em>
                        <a href="<?php the_permalink() ?>" rel="bookmark"
                        title="Permanent Link: <?php the_title(); ?>">
			<?php the_title(); ?></a>
	  <?php endwhile; else: ?>
		<p><?php _e('No posts by this author.'); ?></p>
	  <?php endif; ?>
	  <!– End Loop –>

The code above will display the author’s name, website, profile and the author’s posts.

3. To create the author’s link (maybe somewhere at the post title of your index page), simply put the code below:
<?php the_author_posts_link(); ?>

1. How To: Adding An Author Page To Your WordPress Blog
2. WordPress Author Templates

Related Posts:



This tip is great! thanks. But creating author pages is for those blogs those have multiple authors.

Thanks i will bookmark this page.

Leave a Reply

Your email address will not be published. Required fields are marked *