-
Notifications
You must be signed in to change notification settings - Fork 0
/
author.php
42 lines (33 loc) · 1.03 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
<?php get_header(); ?>
<main>
<!-- Header Author -->
<?php get_template_part('templates/headers/header-author'); ?>
<section>
<?php
$args = array(
'post_type'=>'post',
'author' => get_the_author_meta( 'ID' ),
'posts_per_archive_page' => 10,
'paged' => get_query_var('paged') ? get_query_var('paged') : 1
);
$query = new WP_Query( $args );
if( $query->have_posts() ):
?>
<div>
<?php while( $query->have_posts() ): $query->the_post(); ?>
<!-- Posts cards -->
<?php endwhile; wp_reset_postdata(); ?>
</div>
<div class="pagination">
<?php pagination_posts($query); ?>
</div>
<?php else: ?>
<div>
<span>
Nothing found.
</span>
</div>
<?php endif; ?>
</section>
</main>
<?php get_footer(); ?>