How To Create An Authors Page

in WordPress Tutorials

Most themes do not come with a dedicated page for authors. Under the Template Hierarchy, WordPress will instead look for an archives.php template or an index.php template if an author.php template is not found in the theme directory. This means that the summary of an authors posts will be shown in exactly the same way that monthly and category archives are shown.

Although this way shows all of the authors previous posts, it doesn’t tell you much about the author themselves. If you have many authors writing for your blog, you should perhaps consider creating a dedicated authors page for them in order to give them more exposure.

Creating the Authors page

We start by creating a file called author.php. It is important that the file has this exact name as WordPress looks for that before archives.php and index.php.

The most common way of developing an authors page is by using a variable called $curauth (an abbreviation of Current Author). This is the method which WordPress itself promotes.

So to start we need to set this variable so that WordPress can call up the correct information for our user. The code below needs to be placed in our template before the WordPress Loop.

If the above code doesn’t work (which may be the case if you are using an older version of WordPress), you should try one of the other ways which WordPress suggests.

Once you have added the above code, you can call up any of the functions below:

  • $curauth->aim;
  • $curauth->description;
  • $curauth->display_name;
  • $curauth->first_name;
  • $curauth->ID;
  • $curauth->jabber;
  • $curauth->last_name;
  • $curauth->nickname;
  • $curauth->user_email;
  • $curauth->user_login;
  • $curauth->user_nicename;
  • $curauth->user_registered;
  • $curauth->user_url;
  • $curauth->yim;

* Please note, some of the functions above won’t work in versions lower than WordPress 2.0.

What you add to your author.php file is really up to you. As you can see from the above list, there are a lot of functions you can call upon.

Here is an example of how you could list an authors email on author.php file.

You should now have a basic understanding of how to build the author.php file. WordPress have a great example of an author.php file. You can see this example below:

Of course, your own author.php will look a little different (since the structure of all themes are a little different). Though the example above should illustrate how easy it is to create an author page.

Some important things to note about the author.php file:

  • Other than setting up the Current Author variable ($curauth), the author.php is very similar to the page.php template. Therefore, I recommend adding the code from the page.php template and stripping it down to suit the author.php page. Please read my article ‘How to create a page shell‘ for more information on this.
  • You will notice that the WordPress Loop is only called upon to display the authors posts. Basic information about the author such as name and email etc should be called outside the loop. The loop itself would not be needed if you are not listing the authors posts within the file, though I believe most of you should use it.

Linking to the Authors page

Once you have created your authors page, you need to link to it within your site. The most useful place to link to an authors page is within an articles information area (i.e. the area which states the date the article was published, what category it was placed under etc).

If you want to link to an author page from your home page, you need to edit your index.php template. If you want to display it on a blog post, you need to edit your single.php template. Lastly, if you want to link to an author page from a page (i.e. a WordPress page not a post), you need to edit the page.php template.

To link to an authors page in any of the above templates, all you need to do is use the the_author_posts_link Template Tag within the WordPress Loop. For example, you could add something like this to your template:

Note, the name which is displayed is the name which is entered in a users ‘Display name publicly’ field, which can be found on their profile page. Again, make sure the above tag is used within the WordPress Loop.

Another useful Template Tag is wp_list_authors. This tag can be used outside the WordPress Loop (For example: it could be used in your sidebar or your footer).

The tag simply lists all authors authors in a list. By default, admin is excluded from this list though it is possible to show admin posts as well by setting the exclude_admin parameter to false. Please check out the wp_list_authors information page for more details of the parameters you can use with this tag.


The authors page is something which is not usually included in themes so if you would like to present more information about your writers you will probably need to create the template yourself from scratch.

Please note, most single author websites and blogs don’t need to create an author template, though it’s worth adding if you regularly have guest posters or if several authors write on the same blog.

As always, please let me know if you are unsure about any of this.


Comments (14)

  • Comment by Tony

    Hi Kevin,
    Thanks for the tut. I was wondering if you could shed some light on an issue I’m having. I have included this :

    into the loop for the page template I’m using. It seems to be pulling one author in particular and providing a link to their author page but not reflecting the logged in author. Any ideas?

  • Comment by Trisha

    killer, Walks. thats exactly what I was looking for. Except my authors write pages instead of posts, so i did it like this

  • Comment by Walks

    nvm in case anyone needs to know this I had a brain cramp

    query_posts(‘showposts=&cat=-364,-365&author=’ . $curauth->ID);

  • Comment by Walks

    Got my author page working no problem but I have a category Id like to exclude from the loop, the moment I use query_posts though it shows other authors on my author page (which obviously I dont want).

    Is it possible to somehow throw a $curauth argument in the query posts?

  • Comment by Chris

    Thanks for your help… I will try to read up on things a little more.

  • Comment by Kevin Muldoon
    Kevin Muldoon

    Yeah I know what you mean now. Changing the admin username from admin to chris would give but this would also highlight the admins login name.

    I can’t see any plugins for this on I think you’d have to change the templates manually to do this.

  • Comment by Chirs

    No, sorry if I wasn’t clear. I am not simply trying to change the username (as I could just create another Admin, and then just delete the first, that is easy), rather, I am trying to mask the login name by having another name show up in the author archive URL (like the nickname, or first and last name, but NOT the username for login). Make sense now?

  • Comment by Kevin Muldoon
    Kevin Muldoon

    Hi Chris,
    If it’s just the admin username you want to change then go into phpmyadmin, scroll to wp-users and then modify admin (id 1). Just change user_login from admin to Chris or whatever.


  • Comment by Chris

    Thanks Kevin… It is clear (although not appealing) now. :-)

    I appreciate your help.

    What I am thinking now though is to just create a new user with a login username that is more appealing than the Admin login username. Then, I can give this new user Editor level permissions, and this way I can mask the Admin user ID name from appearing in the Archives URL (which is the whole thing I am trying to get at), and at the same time protect the Admin username ID.


  • Comment by Kevin Muldoon
    Kevin Muldoon

    Hi Chris,

    Yeah I know what you mean. I think the nickname would be preferable to the username in most cases (particularly if someone uses something like Davey1982 or something like that).

    There is no easy way to do what you are asking but it is possible (I haven’t tried it myself though).

    In the wp-includes/author-template.php file, which is the file which decides the url of your author page, WordPress appends either $author_id or $author_nicename to the url. The nicename string is used with those who are using the mod rewrite (i.e. seo friendly urls).

    According to a comment from anonymous left in this forum thread two years ago, you need to replace the nicename string with display_name.

    As you can see from the suggestion, there are 3 or 4 templates you need to update.

    It doesn’t look like it would be too difficult to do so if you really need this for your site I would give it a go.

    Be aware. WordPress uses either the ID or username of an account because it can only be changed via the database and not through the wordpress admin/profile area. The display name field can be changed by the user at any time. It can also include spaces so you may get %20 in urls frequently. Not sure if this is a concern for you though.

    Let me know how you get on :)


  • Comment by Chris

    Hello there…

    Thanks for the information. I am a little overwhelmed though, so I will just ask this question in hopes that you can resolve it for me:

    At the beginning of the “author.php” file I find this code:

    My problem is this:

    I don’t want the username of the author to show in the URL that is generated, like this:

    I would like it to show with the nickname, not the username, in the URL, like this:

    I hope that makes sense. Please do help me if you can…

  • Comment by Kevin Muldoon
    Kevin Muldoon

    no prob;em AJ. Glad you found the article useful :)

  • Comment by Aj

    I am getting ready to turn a blog into a community, this post really helped me figure out how to set up my admin pages. thanks

  • Comment by 10 Useful WordPress Plugins for Multi-Author Blogs & Websites
    10 Useful WordPress Plugins for Multi-Author Blogs & Websites

    […] the Contributor, Author, Editor or Administrator roles. Many themes also come packaged with an author template so that dedicated author information pages can be […]