Repository navigation
Expand file tree
/
Copy pathauthor.php
More file actions
60 lines (55 loc) · 1.82 KB
/
Copy pathauthor.php
File metadata and controls
60 lines (55 loc) · 1.82 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
<?php
/**
* Author archive template.
*
* @package Slateframe
*/
get_header();
global $wp_query;
$slateframe_author_id = get_queried_object_id();
$slateframe_author_bio = get_the_author_meta( 'description', $slateframe_author_id );
/**
* Filters optional avatar/profile media rendered by the author archive.
*
* Empty by default so Slateframe does not introduce a third-party avatar
* request. Sites may provide local media or a plugin-owned avatar here.
*
* @param string $avatar_html Avatar/profile media HTML.
* @param int $author_id WordPress user ID.
*/
$slateframe_author_avatar = apply_filters( 'slateframe_author_avatar_html', '', $slateframe_author_id );
?>
<main id="main-content" class="slateframe-main" tabindex="-1">
<header class="slateframe-page-header">
<div class="slateframe-shell slateframe-author-header">
<?php if ( $slateframe_author_avatar ) : ?>
<div class="slateframe-author-avatar"><?php echo wp_kses_post( $slateframe_author_avatar ); ?></div>
<?php endif; ?>
<div class="slateframe-author-copy">
<h1 class="slateframe-page-title"><?php echo esc_html( get_the_author_meta( 'display_name', $slateframe_author_id ) ); ?></h1>
<?php if ( $slateframe_author_bio ) : ?>
<p class="slateframe-archive-description"><?php echo esc_html( $slateframe_author_bio ); ?></p>
<?php endif; ?>
</div>
</div>
</header>
<div class="slateframe-shell slateframe-grid">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'card' );
endwhile;
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="slateframe-shell slateframe-pagination">
<?php slateframe_pagination(); ?>
</div>
<?php endif; ?>
</main>
<?php
get_footer();