WordPress.org

Ready to get started?Download WordPress

Forums

Get child pages return one page outside the criteria (1 post)

  1. kilab
    Member
    Posted 1 year ago #

    Hi everyone,

    I have code:

    <?php
    $args = array('post_type'=>'page', 'child_of' => $post->ID, 'exclude_tree' => 60, 'sort_column' => 'post_title', 'sort_order' => 'desc');
    query_posts( $args );
    while ( have_posts() ) : the_post(); ?>
     here display thumb and title subpages
    <?php
    endwhile;
    wp_reset_query();
    ?>

    But this code return me one page outside the criteria :(

    I have parent page Offer (id = 13) and 9 child pages for Offer. I should get 9 pages, I get 10.. additional page have id = 60 and post_parent = 0.

    What do You think, why it's not working?

    [ Please do not bump, that's not permitted here. ]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.