-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontent-author.php
More file actions
56 lines (45 loc) · 1.44 KB
/
content-author.php
File metadata and controls
56 lines (45 loc) · 1.44 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
<?php
/**
* The default template for author and posts
*
* @author Kim-Christian Meyer <kim.meyer@palasthotel.de>
* @package digitale-pracht
*/
$curauth = ( get_query_var( 'author_name' ) ) ?
get_user_by( 'slug', get_query_var( 'author_name' ) ) :
get_userdata( get_query_var( 'author' ) );
$grid_title = sprintf( esc_html__( 'All articles by %s', 'digitale-pracht' ), get_the_author_meta( 'display_name', $curauth->ID ) );
if ( have_posts() ) : ?>
<section class="grid-container has-title">
<div class="grid-container-before">
<?php if ( ! empty( $grid_title ) ): ?>
<h1 class="grid-container-title"><?php echo esc_html( $grid_title ); ?></h1>
<?php endif; ?>
</div>
<div class="grid-slots-wrapper">
<div class="grid-slot grid-slot-1d1">
<div class="grid-box grid-box-posts has-no-title">
<?php
// Start the loop.
while ( have_posts() ) : the_post();
get_template_part( 'teaser', 'illustrated' );
// End the loop.
endwhile;
?>
</div>
</div>
</div>
</section>
<?php // Previous/next page navigation.
the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => __( 'Previous', 'digitale-pracht' ),
'next_text' => __( 'Next', 'digitale-pracht' ),
'screen_reader_text' => __( 'Posts navigation', 'digitale-pracht' ),
) );
?>
<?php
// If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );
endif;