-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-build.php
102 lines (77 loc) · 3.17 KB
/
single-build.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php get_header(); ?>
<?php $sp = sp(); ?>
<?php include('application/includes/sub_nav.php'); ?>
<?php
/*****************************************************************************
TOP LEVEL PANE CONTAINER
*****************************************************************************/
?>
<div class="content-wrapper">
<?php
while(have_posts()) : the_post();
?>
<?php
/*****************************************************************************
TOP LEVEL PANE
*****************************************************************************/
?>
<div class="book-container row-fluid">
<?php
/*****************************************************************************
SIDEBAR FOR TABBED CONTENT
*****************************************************************************/
?>
<div id="chapters" class="span3">
<?php include('application/includes/chapters.php'); ?>
</div><!-- sidebar -->
<?php
/*****************************************************************************
SUB PANES FOR TABBED CONTENT
*****************************************************************************/
?>
<div id="<?php echo $post->ID; ?>-content" class="span9 chapter-content-container" >
<?php
/*****************************************************************************
PAGE CONTENT LEAD
*****************************************************************************/
?>
<div class="chapter-content-header lead">
<?php the_content(); ?>
<?php include('application/includes/modal-newpage.php'); ?>
</div><!-- pane content header -->
<?php
/*****************************************************************************
PAGE CONTENT SUB SECTIONS
*****************************************************************************/
?>
<div class="chapter-content">
<?php
$sections = new WP_Query(array(
'post_parent' => $post->ID,
'post_type'=>'build',
'post_status'=>'publish',
'orderby'=>'menu_order',
'order'=>'ASC'
));
?>
<?php while($sections->have_posts()) : $sections->the_post(); ?>
<section class="section" data-id="<?php echo $sections->post->ID; ?>">
<h2><?php the_title(); ?>
<?php include('application/includes/modal-editpost.php'); ?>
</h2>
<?php the_content(); ?>
</section>
<?php endwhile; wp_reset_postdata(); ?>
</div><!-- pane content copy -->
<?php
if($sp->next_chapter) :
?>
<div class="chapter-navigation">
<a href="<?php echo get_permalink($sp->next_chapter->ID); ?>" class="btn btn-large btn-primary">Next: <?php echo $sp->next_chapter->post_title; ?></a>
</div>
<?php endif;?>
</div><!-- chapter-content -->
</div><!-- chapter-container -->
<?php endwhile; wp_reset_postdata(); ?>
</div><!-- parent panes -->
<?php get_footer(); ?>