List custom taxonomy specific to one custom post type

Here’s an example that will list all the mobile_review posts that have the term htc_desire_hd in the taxonomy mobile_phone :

$tax_query = array( 'relation' => 'AND' );

$tax_query[] = array( 
    'taxonomy' => 'mobile_phone', 
    'terms' => array('htc_desire_hd'),
    'field' => 'slug' 
);

$args = array(
    'post_type' => 'mobile_review',
    'tax_query' => $tax_query
);

$custom_loop = new WP_Query( $args ); 

if ( $custom_loop->have_posts() ) :

    while( $custom_loop->have_posts() ) : $custom_loop->the_post(); 

            the_title();

    endwhile;

else :

    _e('Sorry, nothing here.');

endif;

wp_reset_query();

Now you can have the phones reviews by phone model, you just need to change the phone names, pass the name from a form, URL, etc.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)