-
Notifications
You must be signed in to change notification settings - Fork 1
/
author.php
89 lines (64 loc) · 1.9 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* The template for displaying an author's postss
*
* @package Wonderpress Theme
*/
// Set the <body> id
wonder_body_id( 'author' );
get_header();
?>
<main role="main">
<?php
if ( have_posts() ) :
the_post();
?>
<h1>
<?php
esc_html_e( 'Author Archives for ', 'wonder' );
echo get_the_author();
?>
</h1>
<?php if ( get_the_author_meta( 'description' ) ) : ?>
<?php echo get_avatar( get_the_author_meta( 'useresc_html_email' ) ); ?>
<h2>
<?php
esc_html_e( 'About ', 'wonder' );
echo get_the_author();
?>
</h2>
<?php endif; ?>
<?php
rewind_posts();
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) : // Check if Thumbnail exists. ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( array( 120, 120 ) ); // Declare pixel size you need inside the array. ?>
</a>
<?php endif; ?>
<h2>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<span class="date">
<time datetime="<?php the_time( 'Y-m-d' ); ?> <?php the_time( 'H:i' ); ?>">
<?php the_date(); ?> <?php the_time(); ?>
</time>
</span>
<span class="author"><?php esc_html_e( 'Published by', 'wonder' ); ?> <?php the_author_posts_link(); ?></span>
<span class="comments"><?php comments_popup_link( __( 'Leave your thoughts', 'wonder' ), __( '1 Comment', 'wonder' ), __( '% Comments', 'wonder' ) ); ?></span>
<?php the_excerpt(); ?>
<br />
<?php edit_post_link(); ?>
</article>
<?php endwhile; ?>
<?php else : ?>
<article>
<h2><?php esc_html_e( 'Sorry, nothing to display.', 'wonder' ); ?></h2>
</article>
<?php endif; ?>
<?php get_template_part( 'pagination' ); ?>
</main>
<?php get_footer(); ?>