-
Notifications
You must be signed in to change notification settings - Fork 0
/
author.php
37 lines (36 loc) · 1.35 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
<?
$user = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
$show_bio = get_the_author_meta('sfhiv_show_bio',$author);
if(!$show_bio){
header( 'Location: /' );
}
?>
<?php get_header(); ?>
<? if(userphoto_exists($user)): ?>
<div class="sidebar photo">
<? userphoto($user); ?>
</div>
<? endif; ?>
<div id="primary">
<div id="content" role="main">
<article id="user-<?=$author;?>" class="member">
<header>
<h1 class="entry-title"><?=get_the_author_meta('user_firstname',$author);?> <?=get_the_author_meta('user_lastname',$author);?></h1>
</header>
<div class="entry-content">
<?=apply_filters('the_content',$user->description);?>
</div>
</article><!-- #archive -->
</div><!-- #content -->
</div><!-- #primary -->
<? if(get_the_author_meta('sfhiv_show_contact_info',$user->ID)): ?>
<section class="sidebar contact">
<? if(get_the_author_meta('sfhiv_telephone',$user->ID)): ?>
<span class="info phone"><span class="label">Phone:</span> <?=get_the_author_meta('sfhiv_telephone',$user->ID);?></span>
<? endif; ?>
<? if(get_the_author_meta('email',$user->ID)): ?>
<span class="info email"><span class="label">Email:</span> <a href="mailto:<?=get_the_author_meta('email',$user->ID);?>"><?=get_the_author_meta('email',$user->ID);?></a></span>
<? endif; ?>
</section>
<? endif; ?>
<?php get_footer(); ?>