Due to the small number of WordPress blogs that have multiple authors, very few WordPress themes seem to come with a custom author page. This means whenever someone goes to the author page, WordPress will by default use your archives.php file, or if that isn’t available, then use your index.php file. This generally doesn’t make for a very nice author page because it just displays that authors posts in the same format as your archives.
In order to create an author page, you will want to make a copy of your archives.php file and name it author.php, then upload it to your site via FTP. Now go into your theme and edit the author.php page you just created. From here, it will vary a little bit depending on your theme, but we basically 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" class="narrowcolumn">
<!-- 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. To see a list of other arguments you can get, I recommend checking out the official WordPress Author template.
As an added bonus, if you want your authors name link to point towards the authors page, you can do so with the following code:
<?php the_author_posts_link(); ?>













Awesome. This may come in handy if I ever feel the need to add additional authors to my site.
Great!
but I think some thing missing here
How I can tell wordpress to use authors.php page I just created not the archives.php as usually?
because I create authors.php but no changed happened in my blog?
hi again
you have simple mistake in your post
it is “author.php” not “authors.php”
thanks a lot
Amar – Thanks for the correction! I have updated the post accordingly.
Glad you both found the post useful!
but, how to add a link to all users author?
@ Rosyidi – Can you clarify your question?
Thanks so much!! This worked sweet… I am building a kind of social networking complaint site, and this was perfect for creating user profile pages… was very easy to implement.
Thanks again!
Having trouble implementing. Copy archives page, add code in appropriate spot, but only a blank white page shows. Any assistance would be greatly appreciated. By the way… love your theme!
@ Zach – Thanks! Can I get some more information? It looks like some others above have successfully completed this hack, so there is probably just some minor piece of code missing.
Thanks for getting back to me so quick Kyle. I was able to get it to work. I’m now looking at a way to output the authors description formatted.
I managed to get the “posted by” link on the frontpage. but when i clicked the post the authers name is not there?
how to link authors name and profile in every post he writes?
Hi,
Thanks for this tutorial. I just did what you said in your post. But I am not sure how to call / link this author page?
Hey…the link works, but I am getting a parse error at
Fixes? Thanks!
Sorry…this line:
HAHA! Awesome! This was exactly what I needed! To anybody who get’s the blank page after calling the author.php file, it’s because you need to go into to your author.php file and make it look just like your archives.php/index.php file. All you really need to do is make sure you include the following piece of the code as the first thing inside your “content” div:
Hope that helps!
Woops, I should’ve known the code wouldn’t show up. I meant to copy lines 2 through 9 of the example code.
Hello:
I am using Revolution Lifestyle and followed the instructions with the resultant error:
Parse error: parse error, unexpected T_STRING in /home/content/c/o/a/name/html/wp-content/themes/lifestyle_20/author.php on line 24
Help please.
Thanks for this. Any thoughts on how to include a short bio and picture as well?
For example, I’d like to have all the author information at the top, followed by the bio, then a link to the posts by the author (not the actual posts themselves).
My issue is figuring out how and where to store the bio and photo.
Thanks!
Greg
Thank you so much for this write-up! I have been trying to do this for weeks, and yours is the first set of instructions I’ve been able to follow and implement.
This worked for me, but only after I changed the quotes around ’No posts by this author.’ to straight quote (‘No posts by this author’). If you’re just getting a blank page, it might be that that’s your parse issue and you don’t have PHP notices on to tell you. Try that route before you reconfigure for notices.
Anyone know how to make exceptions for certain specific authors? LIke, author id=5 should have a special page that’s different from all the other authors…
ideas?
just discovered the joys of WP – being non-techie legals – but horror of horrors – after getting everything running well – the domain neaglelawyers.com.au masking our WP.com site and the Googles Apps dedicated beta email and adwords – i then roll in to office and smugly do Google search for neagle lawyers to only find absurdly long archive page thing where my clean opening page shouldve been…any pointers as to how to get the domain to direct to the actual masked neaglelawyers.com.au cleanly as i guess this will throw the adwords now as well..
cheers for any forums etc I should monitor/ or advice..
Nick
This worked perfectly for me. How Can I get it to display more than 5 posts by the author?
Hello!
Thanks for this.. I was having a problem before I wanted to display an author wordpress box like psd.tutsplus.com but it kept looking the author box because of the wordpress “the loop” I just wanted to show a box and then loop the authors posts!
Thanks for this!
Worked just fine…
But now a simple question..
And if i want to make a totally diferent page for just a single author.
like we do with posts or categories.
Already tried using author-ID.php and author-slug.php, but none worked.
Is there any way?
Hi,
Thanks this worked great. One question? How can you get a field to NOT display if the author left it blank?
I’m a noob, so please tell me exactly where to add the code. For instance, I specifically don’t want the website field to display if the author hasn’t entered one.
Thanks
Man, you rock!
I’m creating author pages (the theme didn’t have the Author page created) and this tutorial has really helped me a lot. I’m not too familiar with variables like $curauth.
One thing I would still like to do is include TWITTER usernames of authors on the author-pages. Is there anyway to get this done?
Appreciate your help a lot!
Andrew
Did u ever figure this out?
Rich
http://www.grillingwithrich.com
This will surely help me.
thanks a ton..
A+ for this amazing post…
is that tutorial suitable with all themes?
Hi… i have the journalist wordpress theme, which has no author page, which i would like to add. unfortunately i can’t find the archives.php. it just doesn’t seem to be there! do some themes not have that either? is there another way without the archives.php?
PS: i am using Journalist v1.3.
PSS: all i want to do is create a page where logged in users can see all their posts displayed – so if there is anything else you could recommend perhaps which wouldnt mean i had to change theme….
Hello… just to say that I solved the problem simply by playing around the URL. i used an ending of ?author=%USERID%, which points to a page showing all the user’s posts, which is all i wanted to do.
Hello,
I have a newbie question, so if I have a directory and I want to link all of my user names to their author.php I use:
< a href=”http://www.example.com//”>
or should I use
< a href=”http://www.example.com//”>
What I am trying to acccomplish is to allow other users to see the profiles of other users, and not just their own profile.
Simple Tutorial. Easy to make. But: It Works! If you want to have more information just get Advanced User Informations through a Extended User Plugin OR A Custom User Information Plugin and set more Informations and also Show them on the Users Page
Great stuff, took me 2 days to figure it out, but I did, It works flawlessly!!
Hi, this is great. I created my author.php page from scratch with your help. One thing I can’t get to work is author’s pic (via Gravatar) that works any other time when I insert a bio on a post.
I’m trying to use this
What do I need to do in this instance?
Thanks