Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- ~~~~~~~~~~~ START BOOK ~~~~~~~~~~~~~~~~ -->
- <?php while(have_posts()): the_post() ?>
- <div id="ContentWrapper">
- <div id="BookWrapper">
- <?php
- if ( has_post_thumbnail() ) {
- global $post;
- $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' );
- echo'<div class="bookHeader coverPhoto ratio" style="background-image:url('.$src[0].') !important">';
- }
- else { echo'<div class="bookHeader">';}
- ?>
- <h1><?php the_title()?></h1>
- <div class="modDate">Last Updated: <?php the_modified_date()?></div>
- </div>
- <div class="bookContent">
- <?php the_content()?>
- </div>
- <!-- ~~~~~~~~~~~ START CHAPTER ~~~~~~~~~~~~~~~~ -->
- <?php
- $chapter_query = new WP_Query(
- array(
- 'post_type' => 'page',
- 'post_parent' => $post->ID,
- 'orderby' => 'menu_order',
- 'order' => 'ASC',
- ) );
- ?>
- <?php if ($chapter_query->have_posts() ) : ?>
- <?php while($chapter_query->have_posts()): $chapter_query->the_post() ?>
- <div class="chaptersWrapper">
- <div class="chapter">
- <div class="chapterHeader">
- <h1><?php the_title()?></h1>
- <div class="modDate">Last Updated: <?php the_modified_date()?></div>
- </div>
- <div class="chapterContent">
- <?php the_content()?>
- <!-- ~~~~~~~~~~~ START SUB-CHAPTER ~~~~~~~~~~~~~~~~ -->
- <?php
- $subChapter_query = new WP_Query(
- array(
- 'post_type' => 'page',
- 'post_parent' => $post->ID,
- 'orderby' => 'menu_order',
- 'order' => 'ASC',
- ) );
- ?>
- <?php if ($subChapter_query->have_posts() ) : ?>
- <?php while($subChapter_query->have_posts()): $subChapter_query->the_post() ?>
- <?php the_content?>
- <!-- ~THIS IS WHERE WE WOULD PUT THE INCLUDES FOR THE CUSTOM FIELDS IF WE KNEW HOW TO DETECT WHICH FORM WAS BEING USED~ -->
- <?php endwhile?>
- <?php endif;wp_reset_query()?>
- <!-- ~~~~~~~~~~~ END SUB-CHAPTER ~~~~~~~~~~~~~~~~ -->
- </div>
- </div>
- </div>
- <?php endwhile;?>
- <?php endif; wp_reset_query() ?>
- <!-- ~~~~~~~~~~~ END CHAPTER ~~~~~~~~~~~~~~~~ -->
- </div>
- </div>
- <?php endwhile;?>
- <!-- ~~~~~~~~~~~ END BOOK ~~~~~~~~~~~~~~~~ -->
Advertisement
Add Comment
Please, Sign In to add comment