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

WordPress Trac noreply at wordpress.org
Thu May 16 06:11:05 UTC 2013


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

Comment (by Dukessa):

 I solved the problem in another way.
 Instead of generating and passing a string, I generated and passed a full
 array as var.

 {{{
 $excludeposts = get_option('excluded_blogposts');
 //var_export($excludeposts);
 //outputs: array ( 'id1' => '1282', 'id2' => '1194', 'id3' => '1185', )

 'post__not_in' => $excludeposts,
 }}}

 This works fine.

 However, back to the issue, there is either a bug or something isn't quite
 right.
 A variable passing a string and writing the string manually should work
 fine either ways.

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


More information about the wp-trac mailing list