add_filter( 'asp_query_args', 'asp_include_only_term_ids', 2, 2 );
function asp_include_only_term_ids( $args, $id ) {
* Enter the desired taxonomy=>terms here.
* For example, if you want to search category 1 and 2, then:
// Allow results, that does not have connection with the taxonomies
// -- !! Do not change anything below this line !! --
if ( !is_array($args['post_tax_filter']) )
$args['post_tax_filter'] = array();
foreach ($include as $tax => $term_string) {
$terms = explode(",", $term_string);
foreach ($terms as $tk => &$tv)
$args['post_tax_filter'][] = array(