-
Notifications
You must be signed in to change notification settings - Fork 0
/
author.php
58 lines (45 loc) · 1.82 KB
/
author.php
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
<?php get_header(); ?>
<!-- This sets the $curauth variable -->
<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
if($curauth->nickname == 'admin') {require TEMPLATEPATH.'/404.php'; die();}
?>
<article class="nine columns alpha articlewrap">
<section class="article_head">
<h1><?php echo $curauth->first_name.' '.$curauth->last_name; ?></h1>
</section>
<section class="article_text">
<?php $authordata = $curauth; userphoto_the_author_photo(); ?>
<dl>
<?php if($curauth->twitter_handle): ?>
<dt>Twitter</dt>
<dd><a href="http://twitter.com/<?php echo $curauth->twitter_handle; ?>"><?php echo $curauth->twitter_handle; ?></a></dd>
<?php endif; ?>
<dt>Email</dt>
<dd><a href="mailto:<?php echo $curauth->user_email; ?>"><?php echo $curauth->user_email; ?></a></dd>
<?php if($curauth->user_url): ?>
<dt>Website</dt>
<dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
<?php endif; if($curauth->user_description): ?>
<dt>About</dt>
<dd><?php echo $curauth->user_description; ?></dd>
<?php endif; ?>
</dl>
<hr />
<h3>Posts by <?php echo $curauth->first_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>,
<?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>
</section></article>
<?php get_sidebar(); ?>
<?php get_footer(); ?>