[wp-trac] [WordPress Trac] #24351: post__not_in is ignored in WP_Query
WordPress Trac
noreply at wordpress.org
Thu May 16 07:35:04 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: major | Resolution: invalid
Keywords: |
--------------------------+----------------------
Comment (by 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 is 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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24351#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list