http://go.ad2up.com/afu.php?id=665574

WordPress. Add an Author biography page tips

Due to the increasing popularity of wordpress blogs worldwide developers and designers are giving us too many handy tips and tweeks almost daily basis. Let us talk about blogs with multiple authors and too many guest writers, The most important thing comes to our mind is a proper author page and bio for article writers where we can type few sentences about him or her. As you know 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. Note: Each example is linked orignal article source enjoy.

Adding An Author Page to Your WordPress Blog

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">
<!-- 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>

Add a Custom Author Profile Page to Your WordPress

When you have a multi-author blog, it is wise to add an author’s profile page to your WordPress blog. An author page bring the readers close to their favorite authors by having some background information listed in their profile. Sadly, most free WordPress themes do not come with a custom author.php which is why this tutorial can be helpful. In this tutorial, we will be showing you how to add a custom author profile page to your WordPress blog.

Because most free themes do not have a custom author.php file, WordPress automatically callback to archive.php or index.php when someone views the author profile page. The problem with that is that it will only list all the posts written by the author, and it provides no personal information about the author.

It is recommended that you copy your archive.php and save it as author.php and then add the codes from the sample below to customize your page matching the theme settings:

<?php get_header(); ?>

<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;
?>

<h2>About: <?php echo $curauth->nickname; ?></h2>
<dl>
<dt>Website</dt>
<dd><a href=”<?php echo $curauth->user_url; ?>”><?php echo $curauth->user_url; ?></a></dd>
<dt>Profile</dt>
<dd><?php echo $curauth->user_description; ?></dd>
</dl>

<h2>Posts by <?php echo $curauth->nickname; ?>:</h2>

<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>,
<?php the_time(‘d M Y’); ?> in <?php the_category(‘&’);?>
</li>

<?php endwhile; else: ?>
<p><?php _e(‘No posts by this author.’); ?></p>

<?php endif; ?>

<!– End Loop –>

</ul>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

So you should search for words like Written by or something along the same line and replace the codes with this snippet, and if you do not have that code, then you want to add the code below anyways in order to provide your users with a link to author’s profile page.

<p>Written by:
<?php the_author_posts_link(); ?></p>

 How to Add Manually Categories in specific author profile

Want to display all the categories associated with a specific author? The Author Categories WordPress Plugin helps you add such a list, or you can manually add it with a little bit of code to the author template:

<?php
$categories = $wpdb->get_results(”

SELECT DISTINCT(terms.term_id) as ID, terms.name, terms.slug
FROM $wpdb->posts as posts
LEFT JOIN $wpdb->term_relationships as relationships ON posts.ID = relationships.object_ID
LEFT JOIN $wpdb->term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id
LEFT JOIN $wpdb->terms as terms ON tax.term_id = terms.term_id
WHERE 1=1 AND (
posts.post_status = ‘publish’ AND
posts.post_author = ‘$author’ AND
tax.taxonomy = ‘category’ )
ORDER BY terms.name ASC
“);
?>
<h2>Author Categories</h2>
<ul>
<?php foreach($categories as $category) : ?>
<li>
<a href=”<?php echo get_category_link( $category->ID ); ?>” title=”<?php echo $category->name ?>”><?php echo $category->name ?></a>
</li>
<?php endforeach; ?>
</ul>