Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Child Pages Loop
- */
- // calling the header.php
- get_header();
- // action hook for placing content above #container
- thematic_abovecontainer();
- ?>
- <div id="container">
- <?php thematic_abovecontent(); ?>
- <div id="content">
- <?php
- // calling the widget area 'page-top'
- get_sidebar('page-top');
- the_post();
- thematic_abovepost();
- ?>
- <div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class() ?>">
- <?php
- // creating the post header
- thematic_postheader();
- ?>
- <div class="entry-content">
- <?php
- the_content();
- wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'ip4all'), "</div>\n", 'number');
- edit_post_link(__('Edit'),'<span class="edit-link">','</span>') ?>
- </div>
- </div><!-- .post -->
- <?php thematic_belowpost(); ?>
- <?php // separate loop for listing child-pages
- $child_pages = new WP_Query();
- $child_pages->query(array(
- 'orderby' => 'title',
- 'order' => 'ASC',
- 'posts_per_page' => -1,
- 'post_type' => 'page',
- 'post_parent' => $post->ID
- ));
- if ($child_pages->have_posts()) : while ($child_pages->have_posts()) : $child_pages->the_post(); ?>
- <div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
- <?php ip4all_post_image(); ?>
- <h2 class="nomargin">
- <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
- </h2>
- <?php if (has_excerpt()) { ?>
- <p class="excerpt"><?php $excerpt = strip_tags(get_the_excerpt()); echo $excerpt; ?></p>
- <?php } ?>
- <?php edit_post_link(__('Edit', 'ip4all'), '<p class="edit clear">', '</p>'); ?>
- </div><!-- /.post -->
- <?php endwhile; endif; ?>
- <?php
- if ( get_post_custom_values('comments') )
- thematic_comments_template(); // Add a key/value of "comments" to enable comments on pages!
- // calling the widget area 'page-bottom'
- get_sidebar('page-bottom');
- ?>
- </div><!-- #content -->
- <?php thematic_belowcontent(); ?>
- </div><!-- #container -->
- <?php
- // action hook for placing content below #container
- thematic_belowcontainer();
- // calling the standard sidebar
- thematic_sidebar();
- // calling footer.php
- get_footer();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment