Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'd like to make a query that returns the children pages of various parent pages.

Unfortunately the post_parent attribute of WP_Query accepts only one value.

What do you suggest ?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

POST does not have parents, but categories. Only PAGE can have parent. So, the question is, what do you want to get?

In case of getting POSTS from different categories, just use get_posts and add multiple categories.

As for pages, just use get_page_children.

share|improve this answer
    
Sorry I meant "pages" not "posts", the "post" in "post_parent" got me confused.. get_page_children is what I need indeed, thanks! –  mike23 Jun 7 '11 at 5:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.