-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
29 lines (27 loc) · 893 Bytes
/
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
<?php get_header(); ?>
<div class="page-wrapper">
<?php if ( is_home() ) : ?>
<header class="mt-8">
<h1 class="text-3xl font-medium">Blog</h1>
</header>
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 mt-8">
<?php endif; ?>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
$post_format = get_post_format();
if ( is_home() ) {
get_template_part( 'template-parts/content', 'archive' );
} else if ( $post_format ) {
get_template_part( 'template-parts/content', $post_format );
} else {
get_template_part( 'template-parts/content', get_post_type() );
}
}
}
?>
<?php if ( is_home() ) : ?></div><?php endif; ?>
</div>
<?php
get_footer();