WordPress query using term id rather than name
-
Can anybody tell me how to change the query below so that it works of the term id rather than the term name?
<?php query_posts(array( 'post_type' => 'products', 'taxonomy' => 'category', 'term' => 'mytermname', 'showposts' => 10 ) ); ?>
Something like this: (Does not work)
<?php query_posts(array( 'post_type' => 'products', 'taxonomy' => 'category', 'term_id' => '57', 'showposts' => 10 ) ); ?>
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WordPress query using term id rather than name’ is closed to new replies.