-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthor.php
More file actions
69 lines (51 loc) · 1.71 KB
/
Copy pathauthor.php
File metadata and controls
69 lines (51 loc) · 1.71 KB
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
59
60
61
62
63
64
65
66
67
68
69
<?php
get_header( );
?>
<?php
//This sets the $curauth variable
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
$sql_statement = "SELECT * FROM $wpdb->posts WHERE post_author = $curauth->ID AND post_type = 'post' AND post_status = 'publish' ORDER BY ID DESC";
$authorposts = $wpdb->get_results($sql_statement, OBJECT);
?>
<div class="container-fluid">
<div class="row-fluid">
<div class="span8">
<h2><?php _e('About','wpm')?> <?php echo($curauth->display_name); ?></h2>
<?php
if(function_exists('userphoto_exists')){
echo "<div class='span3 pull-right'>";
if(userphoto_exists($curauth->ID))
userphoto($curauth->ID);
else
echo get_avatar($userdata->user_email, 96);
echo "</div>";
}
?>
<div class="span8">
<p>
<strong><?php _e('Website :','wpm'); ?></strong> <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a>
<br />
<strong><?php _e('Description :','wpm'); ?> </strong> <?php echo $curauth->user_description; ?>
</p>
<h3><?php _e('Articles submitted :','wpm'); ?></h3>
<ul id="author-ads">
<?php if ($authorposts): ?>
<?php foreach ($authorposts as $post): ?>
<li>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</li>
<?php endforeach; ?>
<?php else: ?>
<p><?php _e('No ads by this poster yet.','wpm'); ?></p>
<?php endif; ?>
</ul>
</div>
</div>
<?php include (TEMPLATEPATH . '/sidebar-home.php'); ?>
</div>
</div>
<?php get_footer(); ?>