[wp-trac] [WordPress Trac] #24351: post__not_in is ignored in WP_Query

WordPress Trac noreply at wordpress.org
Thu May 16 07:42:24 UTC 2013


#24351: post__not_in is ignored in WP_Query
--------------------------+----------------------
 Reporter:  Dukessa       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Query         |     Version:  3.5.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------

Comment (by Dukessa):

 Replying to [comment:4 knutsp]:
 > The difference is:
 >
 > array(1282,1194,1185) is an array of integer values with 3 elements
 >
 > but
 >
 >
 >
 > array($excludeposts) is an array containing just one value, even if this
 one string value contains a list comma separated values
 >
 > If you pass the string $excludeposts, not array($excludeposts), the
 functions will understand what you mean. And if you prefer to pass an
 array, the array must contain exactly one ID pr item. The elements then
 cannot contain many values.

 You're totally right.
 However, probably best if it's mentioned in the codex just so that people
 don't get frustrated :)
 Thank you

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24351#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list