-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
65 lines (50 loc) · 1.61 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
61
62
63
64
65
<?php
/**
* Template for displaying landing and archive pages
*
* @package Reginald
* @since Reginald 1.0
*/
$reginald_archive_title = '';
$reginald_archive_description = '';
if ( is_search() ) {
$reginald_archive_title = sprintf(
/* translators: %s: search term */
__( 'Search results for: "%s"', 'reginald' ),
'<span>' . get_search_query() . '</span>'
);
} elseif ( is_archive() && ! have_posts() ) {
$reginald_archive_title = __( 'Nothing Found', 'reginald' );
} elseif ( ! is_home() ) {
$reginald_archive_title = get_the_archive_title();
$reginald_archive_description = get_the_archive_description();
}
?>
<?php get_header(); ?>
<main class="site-main" role="main">
<section class="content-container">
<?php if ( $reginald_archive_title || $reginald_archive_description ) : ?>
<header class="archive-header">
<?php if ( $reginald_archive_title ) : ?>
<h1><?php echo wp_kses_post( $reginald_archive_title ); ?></h1>
<?php endif; ?>
<?php if ( $reginald_archive_description ) : ?>
<?php echo wp_kses_post( wpautop( $reginald_archive_description ) ); ?>
<?php endif; ?>
</header>
<?php endif; ?>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content/content', get_post_format() );
}
the_posts_pagination();
} else {
get_template_part( 'template-parts/content/content', 'none' );
}
?>
</section><!-- .contant-container -->
<?php get_sidebar(); ?>
</main><!-- .site-main -->
<?php get_footer(); ?>