category__in doesn’t play nice with others in WP_Query
-
While Passing Parameters in WP_Query. it seems that the ‘category__in’ doesn’t play nice. (or something else is wonky)
these parameters will work fine and give expected results:
$params = array('category__not_in'=> array(4,5),'posts_per_page'=>50,'tag_slug__in'=>array('world','monde'));
$params2 = 'cat=4&tag=world';
$params3 = 'cat=5&tag=monde';
$params4 = array('category__in'=> array(4,5),'posts_per_page'=>50);
while this will give me nothing even thought it should technically (from my humble understanding) include at the very least the results of the $params2 in the above code block.
$params5 = array('category__in'=> array(4,5),'posts_per_page'=>50,'tag_slug__in'=>array('world','monde'));
Putting JUST category__in works fine. as my $params4 shows. Am I mis-understanding how they would interact or should I be filling a bug request?
- The topic ‘category__in doesn’t play nice with others in WP_Query’ is closed to new replies.