Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using WordPress 3.5. My query is,

$args = array(
    'post_type' => array('product', 'comic', 'magazine'),
    'taxonomy' => 'Genres',
    'term' => 'hot',
    'posts_per_page' => 10
);
$the_query = new WP_Query( $args );

// The Loop
while ( $the_query->have_posts() ) :
    $the_query->the_post();
    echo '<li>' . get_the_title() . '</li>';
endwhile;

// Restore original Query & Post Data
wp_reset_query();
wp_reset_postdata();

This gives the exact result that I want but,

$args = array(
    'post_type' => array('product', 'comic', 'magazine'),
    'taxonomy' => 'Genres',
    'term' => array('hot','home'),
    'posts_per_page' => 10
);
$the_query = new WP_Query( $args );

// The Loop
while ( $the_query->have_posts() ) :
    $the_query->the_post();
    echo '<li>' . get_the_title() . '</li>';
endwhile;

// Restore original Query & Post Data
wp_reset_query();
wp_reset_postdata();

This is not working.

share|improve this question
1  
Did you try 'tax_query' codex.wordpress.org/Class_Reference/… –  Upeksha Dec 29 '12 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.