Hi,
In order to create an author page you will need to copy of archives.php file of your theme and rename it with author.php name. Now, upload author.php into site via FTP. Go into theme and edit the author.php page which is just created.
From here, it will vary a little bit depending on theme but we have to redo the post loop for this page. A typical archive page will call the header then finish with calling the sidebar and footer. We will be changing the code in between. Here is the code that a standard theme would use between the header and sidebar/footer calls:
<div id=”content”>
<!– This sets the $curauth variable –>
<?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
?>
<h3>About: <?php echo $curauth->display_name; ?></h3>
<p><strong>Website:</strong> <a href=”<?php echo $curauth->user_url;
?>”><?php echo $curauth->user_url; ?></a></p>
<p><strong>Profile:</strong> <?php echo $curauth->user_description; ?></p>
<h3>Posts by <?php echo $curauth->display_name; ?>:</h3>
<ul>
<!– The Loop –>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link: <?php
the_title(); ?>”>
<?php the_title(); ?></a>
</li>
<?php endwhile; else: ?>
<p><?php _e(‘No posts by this author.’); ?></p>
<?php endif; ?>
<!– End Loop –>
</ul>
</div>
This will display the author’s nickname, their website, and whatever is in the description field as well as a bulleted list of all their posts. Once set up, you can control everything from within your Users panel of your WordPress dashboard.
If you want your authors name link to point towards the authors page then you can do with the following code:
<?php the_author_posts_link(); ?>
That’s it!
Thanks,
Shane G.
Popularity: 1%