-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·25 lines (20 loc) · 809 Bytes
/
index.php
File metadata and controls
executable file
·25 lines (20 loc) · 809 Bytes
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
<?php get_header() ?> <!-- header.php -->
<h3>Index Page</h3>
<div class="container">
<div class="row">
<?php
if (have_posts()): // we have posts or not - checking
while (have_posts()): // loop section
the_post();
//get_post_format(): Aside => aside -> content-aside.php
//get_post_format(): Link => link -> content-link.php
//get_post_format(): Gallery => gallery -> content-gallery.php
// default : content.php
// content-{post-formats}.php > content.php > index.php
get_template_part("template-parts/content", get_post_format()); // content.php
endwhile;
endif;
?>
</div>
</div>
<?php get_footer() ?>