Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16850 closed enhancement (duplicate)

post_parent should accept an array of IDs

Reported by: scribu's profile scribu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch
Focuses: Cc:

Description (last modified by scribu)

Currently, it's not possible to get a list of posts that have one of several parents, since the 'post_parent' query var only accepts an integer.

And, since a post can only have a single parent, there's only one possible interpretation for this:

get_posts( array( 'post_parent' => array( 1, 2, 3 ) ) );

Example use-case: http://wordpress.stackexchange.com/questions/11945/how-to-get-the-parents-taxonomy/11948#11948

Attachments (2)

test-16850.php (320 bytes) - added by scribu 14 years ago.
16850.diff (773 bytes) - added by scribu 14 years ago.

Download all attachments as: .zip

Change History (7)

#1 @scribu
14 years ago

  • Description modified (diff)

@scribu
14 years ago

@scribu
14 years ago

#2 @scribu
14 years ago

  • Keywords has-patch added

#4 @nacin
14 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#5 @scribu
14 years ago

Now how did I miss that...

Note: See TracTickets for help on using tickets.