Title: post_parent
Last modified: August 19, 2016

---

# post_parent

 *  [kikko088](https://wordpress.org/support/users/kikko088/)
 * (@kikko088)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/post_parent/)
 * hi at all, i have a little problem,
    `$myposts = get_posts('post_parent=1&post_type
   =page&orderby=rand&numberposts=1');`
 * with this code i display a random subpage of a mother page, all OK, but if I 
   put another mother page
    `$myposts = get_posts('post_parent=1,2,3&post_type=page&
   orderby=rand&numberposts=1');` nothing, the code display a casual page of other
   mother page…
 * where is the mistake?
    tank at all kikko088

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/post_parent/#post-1647795)
 * i assume from reading the docu that `post_parent` can only take **one **id as
   argument:
 * > $post_parent
   >  (integer) (optional) Show only the children of the post with 
   > this ID Default: None
 * [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
 *  Thread Starter [kikko088](https://wordpress.org/support/users/kikko088/)
 * (@kikko088)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/post_parent/#post-1647798)
 * 🙁 thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘post_parent’ is closed to new replies.

## Tags

 * [post_parent](https://wordpress.org/support/topic-tag/post_parent/)

 * 2 replies
 * 2 participants
 * Last reply from: [kikko088](https://wordpress.org/support/users/kikko088/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/post_parent/#post-1647798)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
