Get post by term from custom taxonomy in another blog on the network?

I found a small hack to filter by taxonomy without create the taxonomy in the child theme.

In the core exists the function “taxonomy_exists“:

function taxonomy_exists( $taxonomy ) {
        global $wp_taxonomies;

        return isset( $wp_taxonomies[$taxonomy] );
}

And is this function who hive “false” because the taxonomy don’t exists in your child theme. If this function give “false” the class “WP_Tax_Query” will not return a valid SQL to filter by taxonomy.

So, like @jerime says “My solution (at least for now) register the taxonomy in that blog”.

You can “create” a the taxonomy only to do this filter, like:

// Add this before the loop
// The if is to don't touch the taxonomy if is a real taxonomy
// The "delete" value is to know this is not a real taxonomy
global $wp_taxonomies;
if(!taxonomy_exists('warrant_status'))
    $wp_taxonomies['warrant_status'] = 'delete';

// The normal loop
$args=array(
        'post_type' => $type,
        'posts_per_page' => 6,
        'paged' => $paged,
        'tax_query' =>
                array(
                        array(
                                'taxonomy' => 'warrant_status',
                                'field' => 'id',
                                'terms' => 'most-wanted',
                        )
                )

        );                                       

$my_query = null;
$my_query = new WP_Query($args);

// After finish the loop, remove the hack
// do the if to don't delete a real taxonomy
if ($wp_taxonomies['warrant_status'] == 'delete')
    unset($wp_taxonomies['warrant_status'])