-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-index.php
46 lines (40 loc) · 1.33 KB
/
page-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
<?php
/* Template Name: Index/Tiled */
get_header();
?>
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<div class="content-wrapper">
<div class="container">
<?php the_breadcrumbs(); ?>
<h1 class="page-title"><?php the_title(); ?></h1>
<div class="layout-sidebar-right">
<div class="layout-sidebar-right__main-content">
<article class="content-area">
<?php the_content(); ?>
</article>
</div>
</div>
<?php
$children = new WP_Query(array(
'post_type' => 'page',
'post_status' => 'publish',
'posts_per_page' => -1,
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order'
));
if ( $children->have_posts() ):
echo "<ul class='child-tiles'>";
while ( $children->have_posts() ) : $children->the_post();
echo "<li class='child-tile'>";
echo "<a href='" . get_the_permalink() . "'>" . get_the_title() . "</a>";
the_excerpt();
echo "</li>";
endwhile;
echo "</ul>";
endif; wp_reset_postdata();
?>
</div>
</div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>