This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
/
index.php
58 lines (43 loc) · 1.5 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
<?php
/*
THE INDEX
The most basic template file from this theme. The index defines what it's showing and sets which partial template file will handle this type of content.
But first, we will get the header.
*/
?>
<?php get_header(); ?>
<?php if( is_home() ) : ?>
<div id="featured-content" class="featured-container wrapper">
<?php get_template_part( 'template-parts/features/archive', 'featured' ); ?>
</div>
<div class="featured-container wrapper">
<?php get_sidebar( 'featured-widgets' ); ?>
</div>
<?php endif; ?>
<main id="content" class="site-content wrapper">
<div class="content-area post-list" role="content" id="content-area">
<?php if( have_posts() ) : ?>
<?php if( is_home() && !( is_front_page() ) ) : ?>
<header class="page-header">
<h1 class="page-title assistive-text"><?php single_post_title(); ?></h1>
</header>
<?php endif; ?>
<?php
// Now, the loop.
while( have_posts() ) : the_post();
// This partial defines how the index (and search and archive) pages shows a post.
get_template_part( 'template-parts/archives/archive', get_post_format() );
endwhile;
// And now, the post navigation.
the_posts_navigation();
?>
<?php else : ?>
<?php
// No posts, show a message about it.
get_template_part( 'template-parts/archives/archive', 'none' );
?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</main>
<?php get_footer(); ?>