Home › Forums › Other › how to get custom posts for custom taxonomy ? › Reply To: how to get custom posts for custom taxonomy ?
October 2, 2013 at 7:02 am
#151901
Senff
Participant
To list all posts of type “videos” that have “comedy” checked in the custom taxonomy “type“:
$args = array(
'post_type' => 'videos',
'type' => 'comedy'
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo '- '.get_the_title().'<br>';
// other loopy stuff here
endwhile;
More info: http://www.senff.com/front-end/on-custom-taxonomies/