-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
51 lines (50 loc) · 1.6 KB
/
archive.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
<?php
get_header();
?>
<section class="titlesection mb-5">
<div class="">
<div class="container">
<!-- <h1><?php the_archive_title(); ?></h1> show the title with befor -->
<h1><?php
if (is_category()) {
echo 'Categories: ' . single_cat_title();
} elseif (is_tag()) {
// single_tag_title();
echo "The Tag archive " . single_tag_title();
} elseif (is_day()) {
echo 'the day archive:' . get_the_date('j F');
}
?></h1>
<div>
<!-- <span><?php the_time('F j, Y'); ?> </span>
<span><?php the_tags("<span> The tags: ", " </span>"); ?></span>
<span><?php the_category(); ?></span>
<span><?php comments_number() ?></span> -->
</div>
</div>
</div>
</section>
<section class="container">
<div class="row">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
// the_content( );
get_template_part('template-parts/content', 'archive');
}
wp_reset_postdata(); //After looping through a separate query, this function restores the $post global to the current post in the main query.
}
?>
</div>
<?php
the_posts_pagination(array(
'mid_size' => 2,
'prev_text' => __('Previuos Page', 'textdomain'),
'next_text' => __('Next Page', 'textdomain')
));
?>
</section>
<?php
get_footer();
?>