Created
March 5, 2014 03:31
-
-
Save davemac/9360648 to your computer and use it in GitHub Desktop.
For Deb, custom query to get child title, link, thumbnail image and excerpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<!-- About --> | |
<div id="content" class="eight columns"> | |
<div class="post-box"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<h1><?php the_title(); ?></h1> | |
<?php the_content(); ?> | |
<?php endwhile; // end of the loop. ?> | |
<?php $list_children = new WP_Query( array( | |
'post_type' => 'page', | |
'orderby'=>'menu_order', | |
'order'=>'ASC', | |
'post_parent' => $post->ID, | |
)); | |
while ( $list_children->have_posts() ) : $list_children->the_post(); ?> | |
<div class="section"> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> | |
<?php the_post_thumbnail( array( 'width' => 125, 'height' => 125, 'crop' => 'true' ) , array( 'class' => 'alignright' ) ); ?> | |
</a> | |
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> | |
<?php the_excerpt(); ?> | |
<p class="more"><a href="<?php the_permalink(); ?>">Read more about <?php the_title(); ?></a></p> | |
</div> | |
<?php endwhile; wp_reset_query(); ?> | |
</div> | |
</div><!-- End Content row --> | |
<?php get_sidebar(); ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Needs WP Thumb plugin for thumbnail manipulation and display