-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.php
102 lines (55 loc) · 2.22 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php get_header(); ?>
<main id="site-content" role="main">
<?php if ( is_archive() || is_search() ) : ?>
<header class="archive-header archive-header-mobile bg-color-black color-darker-gray">
<div class="section-inner">
<?php
// Store the output, since we're outputting the archive header twice (desktop version and mobile version)
ob_start(); ?>
<h6 class="subheading"><?php echo koji_get_archive_title_prefix(); ?></h6>
<div class="archive-header-inner">
<h3 class="archive-title color-white hanging-quotes"><?php the_archive_title(); ?></h3>
<?php if ( is_search() ) :
global $wp_query; ?>
<div class="archive-description">
<p><?php
// Translators: %s = the number of results
printf( _nx( 'Found %s result matching your search.', 'Found %s results matching your search.',$wp_query->found_posts, '%s = number of results', 'koji' ), $wp_query->found_posts ); ?></p>
</div><!-- .archive-description -->
<?php elseif ( get_the_archive_description() ) : ?>
<div class="archive-description">
<?php the_archive_description(); ?>
</div><!-- .archive-description -->
<?php endif; ?>
</div><!-- .archive-header-inner -->
<?php
$archive_header_contents = ob_get_clean();
echo $archive_header_contents;
?>
</div><!-- .section-inner -->
</header><!-- .archive-header -->
<?php endif; ?>
<div class="section-inner">
<div class="posts load-more-target" id="posts" aria-live="polite">
<div class="grid-sizer"></div>
<?php if ( is_archive() || is_search() ) : ?>
<div class="preview archive-header archive-header-desktop">
<div class="preview-wrapper bg-color-black color-gray">
<div class="preview-inner">
<?php echo $archive_header_contents; ?>
</div><!-- .preview-inner -->
</div><!-- .preview -->
</div><!-- .archive-header -->
<?php
endif;
if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'preview', get_post_type() );
endwhile;
endif;
?>
</div><!-- .posts -->
<?php get_template_part( 'pagination' ); ?>
</div><!-- .section-inner -->
</main><!-- #site-content -->
<?php get_footer(); ?>