Multiple post_parent's in query_posts
-
I am trying to return 5 random pages from two page parents and cannot get it to work. My current code works fine to pull the information for a single page parent (1763) using post_parent –
$args=array(‘post_type’ => ‘page’, ‘post_parent’ => 1763, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 5, “orderby” => ‘rand’);
query_posts($args);I need it to work with multiple post_parent’s. This doesn’t work, but this gives you an idea of what I am trying to do with post_parent –
$args=array(‘post_type’ => ‘page’, ‘post_parent’ => (1763,1764), ‘post_status’ => ‘publish’, ‘posts_per_page’ => 5, “orderby” => ‘rand’);
query_posts($args);Any help would be greatly appreciated!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Multiple post_parent's in query_posts’ is closed to new replies.