-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
51 lines (42 loc) · 1.3 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
<?php get_header(); ?>
<?php get_template_part( 'nav' ); // Navigation bar (nav.php) ?>
<div id="sectionHeaderBackground">
<?php single_cat_title(); ?>
<div id="sectionHeader" class="container">
<h1><a href="<?php echo get_permalink($post->post_parent) ?>"><?php echo empty( $post->post_parent ) ? get_the_title( $post->ID ) : get_the_title( $post->post_parent );?></a></h1>
</div>
</div>
<!-- /end SectionHeader -->
<div id="mainBackground">
<div id="main" class="container">
<div class="row">
<?php
if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
<aside class="span3">
<ul class="nav nav-tabs nav-stacked">
<?php echo $children; ?>
</ul>
</aside>
<!-- /end asideRight -->
<div id="mainContent" class="span9">
<?php the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<!-- /end main content -->
<?php }
else { ?>
<div id="mainContent" class="span12">
<?php the_post(); ?>
<?php the_content(); ?>
</div>
<!-- /end main content -->
<?php } ?>
</div>
</div>
</div>
<?php get_footer(); ?>