Support » Plugins » WP_Query to pull more than one Page Parent

  • I’m trying to use WP_Query to pull a list of a specific page’s sub-pages and a great deal of custom values. For example:

    <?php $page_query = new WP_Query('post_type=page&post_parent=782&orderby=title&order=asc'); ?>
    <?php while ($page_query->have_posts()) : $page_query->the_post(); ?>
    <div class="faculty">
    <div class="faculty_name">
    <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
    <?php // Lists values with the key Title
    $mykey_values = get_post_custom_values('Title');
    if (isset ($mykey_values)) {
    foreach ( $mykey_values as $key => $value ) {
    echo " | <span class=\"title\">$value</span>";
    } ?>
    <?php endwhile; ?>

    What I need to do NEXT is pull that same query from more than one parent page and display them in in one page.

    I’ve been hitting my head against the wall on this all night. Any suggestions?

  • The topic ‘WP_Query to pull more than one Page Parent’ is closed to new replies.