Support » Fixing WordPress » query posts displaying children of page on

  • i have used the below in the past to target specific categories, can i repurpose it to pull a pages children? looking to do a list with the excerpt from a page and some details before launching into its main page.

    <ul>
    <?php $temp_query = $wp_query; ?>
    <?php query_posts("category_name='news'&showposts=2"); ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    <li class="post" id="post-<?php the_ID(); ?>">
    <div class="news">
    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    <?php the_excerpt(); ?>
    </div>
    
    <div class="more">
    <p><?php the_time('m.d.y') ?></p>
    <p><a href="<?php the_permalink(); ?>">READ MORE ></a></p>
    </div>
    </li>
    
    <?php endwhile; ?>
    
    </ul>
  • The topic ‘query posts displaying children of page on’ is closed to new replies.