{"id":1935805,"date":"2011-02-24T16:47:34","date_gmt":"2011-02-24T16:47:34","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/wp_query-broken-in-31\/"},"modified":"2016-08-19T22:47:09","modified_gmt":"2016-08-19T22:47:09","slug":"wp_query-broken-in-31","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/wp_query-broken-in-31\/","title":{"rendered":"WP_Query broken in 3.1"},"content":{"rendered":"<p>$my_query = new WP_Query(&#8216;showposts=10&amp;category_name=portfolio&#8217;);<br \/>\nThis should theoretically return all the posts under the category named &#8220;portfolio&#8221; but I get all the post returned that is not in the &#8220;portfolio&#8221; category.<\/p>\n<p>This query is called:<br \/>\nSELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  WHERE 1=1  AND ( wp_posts.ID <strong>NOT<\/strong> IN (<br \/>\n\t\t\t\t\tSELECT object_id<br \/>\n\t\t\t\t\tFROM wp_term_relationships<br \/>\n\t\t\t\t\tWHERE term_taxonomy_id IN (5,6,7,45)<br \/>\n\t\t\t\t) ) AND wp_posts.post_type = &#8216;post&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;private&#8217;) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10<\/p>\n<p>Ideas?<\/p>\n","protected":false},"template":"","class_list":["post-1935805","topic","type-topic","status-closed","hentry","topic-tag-category","topic-tag-query"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1935805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1935805\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1935805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}