-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
60 lines (53 loc) · 1.38 KB
/
index.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
52
53
54
55
56
57
58
59
60
<?php
/**
* This is the template for all Archives and Blog posts page.
*/
get_header();
?>
<main class="content">
<section class="container">
<?php
if ( is_archive() ) {
// If it's Author, Category, Taxonomy, Date or Tag Archive or CPT Archive itself use the_archive_title() for main title of the page.
?>
<h1><?php the_archive_title(); ?></h1>
<?php
} elseif ( is_search() ) {
// If it's page with Search results use custom string with search term as a main title.
?>
<h1><?php _e( 'Search' ); ?> - "<?php echo get_search_query(); ?>"</h1>
<?php
} elseif ( is_home() && !is_front_page() ) {
// If it's Blog posts page use name of the page for posts as a main title.
?>
<h1><?php echo esc_html( get_the_title( get_option( 'page_for_posts' ) ) ); ?></h1>
<?php
}
?>
<div class="row row_justify-space">
<div class="loop-wrapper loop-post">
<div class="row row_justify-space">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'components/loop', get_post_type() );
}
?>
</div>
<?php
the_posts_pagination(
array(
'prev_text' => '«',
'next_text' => '»'
)
);
?>
</div>
<?php
get_sidebar();
?>
</div>
</section>
</main>
<?php
get_footer();