It’ll look a bit complicated, but you can pass the ‘category__and’ union or method passed through an array, which is briefly noted in the last example here:
http://codex.ww.wp.xz.cn/Template_Tags/query_posts#Combining_Parameters
Reference:
http://boren.nu/archives/2007/10/01/taxonomy-intersections-and-unions/
Thanks for the reply. What I gather from the page you linked to is that this is a static thing for the homepage. How would I implement this in the widgets.php category code?
I have looked through the function wp_widget_categories and cannot figure out where I would place the
query_posts(array(‘category__and’=>array(1,3),’showposts’=>2,’orderby’=>title,’order’=>DESC));
Thanks!
This is the code I am trying to modify at the moment
<script lang=’javascript’><!–
j = ‘,8’;
var dropdown = document.getElementById(“cat”);
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
location.href = “<?php echo get_option(‘home’);
?>/?cat=”+dropdown.options[dropdown.selectedIndex].value+j;
}
}
dropdown.onchange = onCatChange;
–></script>
The variable j is what I am trying to incorporate the =>array(1,3)from the support post into. Now I know this is javascript but php is being used inside of it. So how do I make the code work to where the value+j works the same as the array (1,3)?
Thanks.