Using 'category__and' returns no results in WordPress 3.2
-
Hi,
since i updated to WP 3.2 there seems to be a bug in using ‘category__and’.
My values for the ‘category__and’ array are coming from 2 Dropdowns, so they may be selected but DON`T NEED TO.
Example:
$media_type = ( isset($_GET['media_type'])) ? get_category_by_slug($_GET['media_type']) : ''; $country = ( isset($_GET['country'])) ? get_category_by_slug($_GET['country']) : ''; $args = array( 'category__and' => array($media_type->term_id,$country->term_id), 'category__in' => array(8), 'paged' => $paged, 'monthnum' => $release_month, 'year'=> $release_year ); query_posts($args);
The above code is the one i am using and which worked prior to WP 3.2.
When both, $media_type and $country are selected through the dropdown it works.
<strong>Problem:</strong>
If none or only 1 of the two were selected it does not work. So it seems like they both need to be integers or it won`t work.
I tried deactivating all plugins but it did not work. I need help since i don`t think i can solve this.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Using 'category__and' returns no results in WordPress 3.2’ is closed to new replies.