-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharchive.php
More file actions
65 lines (51 loc) · 1.46 KB
/
archive.php
File metadata and controls
65 lines (51 loc) · 1.46 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
<?php
get_header();
?>
<div class="container-blog">
<section class="container-inicial-blog">
<h1>Arquivo</h1>
</section>
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
if (have_posts()) :
if ( $paged == 1 ) :
the_post();
?>
<section class="conteiner-destaque">
<?php get_template_part('template-parts/content', 'archive'); ?>
</section>
<?php
endif;
rewind_posts();
?>
<section class="conteiner-conteudos">
<?php
$post_count = 0;
while (have_posts()) : the_post();
if ( $paged == 1 && $post_count == 0 ) :
$post_count++;
continue;
endif;
?>
<div class="painel-blogs">
<?php get_template_part('template-parts/content', 'archive'); ?>
</div>
<?php
$post_count++;
endwhile;
?>
</section>
<?php
the_posts_pagination(array(
'mid_size' => 2,
'prev_text' => __('« Anterior', 'textdomain'),
'next_text' => __('Próximo »', 'textdomain'),
));
else :
echo '<p>Nenhum post encontrado!</p>';
endif;
?>
</div>
<?php
get_footer();
?>