Get Subpages Query in wordpress

Posted: January 2, 2015 in All Category, WordPress

<?php $this_page_id=$wp_query->post->ID; ?>
<?php query_posts(array('showposts' => 20, 'post_parent' => $this_page_id, 'post_type' => 'page'));
while (have_posts()) { the_post(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class('item'); ?>>
<!-- Figure / Image -->
<?php if ( has_post_thumbnail() ) {?>
<figure>
<a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('small-thumb'); ?>
</a>
</figure>
<?php } ?>

<!-- Title -->
<h1 class="entry-header">
<a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h1>

</div>
</article>
<?php } ?>
Advertisements

Comments are closed.