WordPress.org

Ready to get started?Download WordPress

Forums

grabbing parent page and its children (1 post)

  1. shamai
    Member
    Posted 1 year ago #

    on the parent page:

    <?php $parent = $post->ID; ?>
    <?php query_posts('post_type=page&post_parent='.$parent);
    then i would go through the loop. It gets all the children of the current page

    it outputs the children but not the parent how can I grab the parent!? or do i need to make this a seperate loop?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags