author.php

author.php allows you to customize the page that displays entries by a particular author.


<?php include (TEMPLATEPATH . '/header.php'); ?>

<!-- middle content area -->
<div id="midbox">

<div id="mainsidebar">
<!-- sidebar -->
<?php include (TEMPLATEPATH . '/sidebarblog.php'); ?>
<!-- end sidebar -->
</div>

<div id="main"> <a name="maincontent" id="maincontent"></a>

<!-- 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 class="profilepic"><?php $atts = array('callmethod' => 'shortcode', 'userid' => $authid); echo profilepic_gui_printprofile($atts); ?></p>

<dl>
<dt>Website:</dt>
<dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
<dt>Bio:</dt>
<dd>
<p class="profiletext"><?php echo $curauth->user_description; ?></p></dd>
</dl>

<h4 class="clear">Posts by <?php echo $curauth->nickname; ?>:</h4>

<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('M d Y'); ?>)
</li>

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

<?php endif; ?>

<!-- End Loop -->
</ul>

</div>
<!-- end middle content area -->
</div>
<!-- end content -->

<!-- Footer -->
<?php include (TEMPLATEPATH . '/footer.php'); ?>
<!-- Footer -->