+ Reply to Thread
Results 1 to 1 of 1
Thread: Author page in Wordpress
-
02-18-2010 12:14 PM #1
- Join Date
- Jul 2009
- Location
- United Kingdom
- Posts
- 489
- Downloads
- 0
- Uploads
- 17
- Blog Entries
- 2
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:
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.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>
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.
Similar Threads
-
SEO tips for Wordpress
By chriscash01 in forum Search Engine OptimisationReplies: 7Last Post: 07-27-2011, 11:38 AM -
Free WordPress Blog Domains VS Self/Other-Hosted Blogs
By jay in forum Wordpress ForumReplies: 1Last Post: 05-05-2009, 01:18 PM -
Free Wordpress Template - Poker Time - Free Download
By kedaimart in forum WordPress TemplatesReplies: 0Last Post: 02-11-2009, 01:40 PM -
13 Wordpress Plugins You Probably Don't Use But Should
By TVDinner in forum WordPress TemplatesReplies: 5Last Post: 10-27-2008, 10:21 PM -
Useful Wordpress Plugins
By Footzilla in forum Search Engine MarketingReplies: 1Last Post: 05-11-2008, 06:29 AM


LinkBack URL
About LinkBacks


Reply With Quote



Bookmarks