Making A WordPress Author Page

The Author page or About page is very much common, where the site author displays his/her name, description, etc. To make an author page, just create an author.php, and upload it in your theme folder. The code is as follows: <h1 class="h2">Posts by <?php echo $curauth->first_name; ?> <?php echo $curauth->last_name; ?></h1> <p><?php echo $curauth->description; ?><br /> Website: <a href="<?php […]

The Author page or About page is very much common, where the site author displays his/her name, description, etc. To make an author page, just create an author.php, and upload it in your theme folder. The code is as follows:

<h1 class="h2">Posts by <?php echo $curauth->first_name; ?> <?php echo $curauth->last_name; ?></h1><p><?php echo $curauth->description; ?><br /> Website: <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></p><p><?php echo html_entity_decode(get_the_author_description()); ?></p><ul> <!&ndash; The Loop &ndash;> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><?php the_time('m-d-y'); ?>: <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a> &raquo; <?php the_category('&');?> <?php // the_excerpt(); ?> </li><?php endwhile; else: ?> <p><?php _e('no posts by this author.'); ?></p><?php endif; ?> <!&ndash; End Loop &ndash;> </ul>

Then add this in top of your sidebar:

<?php /* if this is the frontpage */ if ( is_home() || is_page() || is_single() || is_category() || is_day() || is_month() || is_year() || is_search() || is_404() || is_author() ) { ?>

and this in the sidebar to show links:

<ul> <?php wp_list_authors('show_fullname="1&optioncount=1&prime;);" ?> </ul>

The author page descriptions come from the users' descriptions in the WordPress admin panel — although WordPress strips out any links they may post there. There are instructions in the WordPress forums about how to allow links in Author descriptions.

Source:→ developedtraffic

WorPress, Tips, Tricks, WordPress Tips & Tricks, Author Page, About Page