He encontrado esto a ver si te sirve:
http://wordpress.org/support/topic/223854
<?php
function wpmm_load_category() {
if (!empty($_POST['wpmm'])){
$cats = $_POST['wpmm'];
$count = 0;
$sql = array();
foreach ($cats as $cat) {
if ($cat == 0)
unset($cats[$count]);
else
array_push($sql, $cat);
$count++;
}
query_posts(array('category__'.$_POST['mmctype'] => $sql));
}
}
function widget_wpmm($args) {
extract($args);
global $wpdb;
$children = $wpdb->get_results('SELECT tx.term_id, tx.parent, t.name
FROM '.$wpdb->term_taxonomy.' as tx, '.$wpdb->terms.' as t WHERE tx.taxonomy = "category"
AND t.term_id = tx.term_id AND tx.parent != 0
ORDER BY tx.parent, t.name ASC', ARRAY_A);
$parents = $wpdb->get_results('SELECT tx.term_id, t.name
FROM '.$wpdb->term_taxonomy.' as tx, '.$wpdb->terms.' as t WHERE tx.taxonomy = "category"
AND t.term_id = tx.term_id AND tx.parent = 0 AND t.name != "Uncategorized"
ORDER BY t.name ASC', ARRAY_A);
echo $before_widget;
echo $before_title . '<center> Search by Item and Location </center>' . $after_title .'
<center><form action="" method="post" id="wpmm">';
foreach ($parents as $p){
echo '<select name="wpmm[]"><option value="0">'.apply_filters('single_cat_title', stripslashes(str_replace('"', '', $p['name']))).'</option>';
foreach ($children as $c){
$selected = '';
if (!empty($_POST['wpmm'])){
foreach ($_POST['wpmm'] as $cat){
if ($cat == $c['term_id'])
$selected = 'selected="selected"';
}
}
if ($p['term_id'] == $c['parent'])
echo '<option '.$selected.' value="'.$c['term_id'].'"> '.apply_filters('single_cat_title', stripslashes(str_replace('"', '', $c['name']))).'</option>';
}
echo '</select>';
}
$checked1 = '';
$checked2 = '';
if ($_POST['mmctype'] == 'and')
$checked2 = 'checked="checked"';
else if ($_POST['mmctype'] == 'in')
$checked1 = 'checked="checked"';
else
$checked2 = 'checked="checked"';
echo 'Any <input type="radio" name="mmctype" value="in" '.$checked1.'> All <input type="radio" name="mmctype" value="and" '.$checked2.'><input type="submit" value="GO"></form></center>'.$after_widget;
}
function wpmm_widgets(){
register_sidebar_widget('Multi-Category', 'widget_wpmm');
}
add_action('init','wpmm_load_category');
add_action('plugins_loaded', 'wpmm_widgets');
?>
Es para hacer un Widget, pero quizás puedas sacar algo que te sirva.
Saludos