Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $counter = 1 ?>
- <div class="row-fluid">
- <?php
- $pages = get_pages('child_of='.$post->ID.'&sort_order=asc&sort_column=menu_order&parent='.$post->ID);
- foreach($pages as $page) { ?>
- <h2><?php echo $page->post_title ?></h2>
- <?php
- $the_query = new WP_Query( array(
- 'post_parent' => $page->ID,
- 'orderby' => 'menu_order',
- 'order' => 'ASC',
- 'posts_per_page' => 3,
- ));
- while ( $the_query->have_posts() ) :
- $the_query->the_post();
- ?>
- <div class="span4">
- <h2><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
- <?php the_content(); ?>
- </div>
- <? if ($counter % 3 == 0): ?>
- </div>
- <div class="row-fluid">
- <?php endif; ?>
- <?php $counter++; ?>
- <?php
- endwhile;
- wp_reset_postdata();
- } ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement