-
Notifications
You must be signed in to change notification settings - Fork 1
/
page.php
55 lines (43 loc) · 1.52 KB
/
page.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
<?php
get_header();
while(have_posts()){
the_post();
pageBanner();
?>
<div class="container container--narrow page-section">
<?php if ($theParent = wp_get_post_parent_id(get_the_ID()) ) : ?>
<div class="metabox metabox--position-up metabox--with-home-link">
<p><a class="metabox__blog-home-link" href="<?php echo get_permalink($theParent); ?>"><i class="fa fa-home" aria-hidden="true"></i> Back to <?php echo get_the_title($theParent); ?></a> <span class="metabox__main"><?php the_title(); ?></span></p>
</div>
<?php endif; ?>
<?php if($theParent || get_pages(array('child_of' => get_the_ID())) ) : ?>
<div class="page-links">
<h2 class="page-links__title">
<a href="<?php echo get_permalink($theParent); ?>"><?php echo get_the_title($theParent); ?></a>
</h2>
<ul class="min-list">
<?php
if($theParent)
{
$findChildrenOf = $theParent;
}
else
{
$findChildrenOf = get_the_ID();
}
wp_list_pages(array(
'title_li' => NULL,
'child_of' => $findChildrenOf,
'sort_column' => 'menu_order'
));
?>
</ul>
</div>
<?php endif; ?>
<div class="generic-content">
<p><?php the_content(); ?></p>
</div>
</div>
<?php }
get_footer();
?>