WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.