+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2009
    Location
    United Kingdom
    Posts
    489
    Downloads
    0
    Uploads
    17
    Blog Entries
    2

    Default Author page in Wordpress

    In case you have a common blog, where more that 1 person it's writing, then you should have an author page, where there will be listed information about the author, nickname, website url, bio and also latest 5 posts about the author. This is used also as a reward for the other authors that are writing in your blog as a sign of appreciation of their work.

    So let's start with the implementation. Search on your template the file archives.php file and name it author.php, then upload it to your site via FTP. Now you have to edit the file author.php that you have just created. A normal archive page is calling the header, sidebar and footer. We need to alter the section in between. Here is the code you need to insert:

    PHP Code:
    <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.

    If you want your authors name link to point towards the authors page, you can do so with the following code:

    PHP Code:
    <?php the_author_posts_link(); ?>
    Last edited by ovidiuu; 02-18-2010 at 12:20 PM.

  2. WebmasterServe Adverts:
+ Reply to Thread

Similar Threads

  1. SEO tips for Wordpress
    By chriscash01 in forum Search Engine Optimisation
    Replies: 7
    Last Post: 07-27-2011, 11:38 AM
  2. Replies: 1
    Last Post: 05-05-2009, 01:18 PM
  3. Free Wordpress Template - Poker Time - Free Download
    By kedaimart in forum WordPress Templates
    Replies: 0
    Last Post: 02-11-2009, 01:40 PM
  4. 13 Wordpress Plugins You Probably Don't Use But Should
    By TVDinner in forum WordPress Templates
    Replies: 5
    Last Post: 10-27-2008, 10:21 PM
  5. Useful Wordpress Plugins
    By Footzilla in forum Search Engine Marketing
    Replies: 1
    Last Post: 05-11-2008, 06:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110