[wp-testers] custom post types filter category (taxonomy)
Damian Biedziak
info at d4b.com.pl
Tue Jun 15 14:58:24 UTC 2010
If I create a custom post, how can I filter my query to a specific category?
Let's say a create a custom post type called 'Music' and I create 3
categories : 'jazz', 'classical' and rock. How can I only display the 'jazz'
and 'rock' entries??
This's not wok query_posts('post_type=uslugi&cat=17,19'); ?
<?php
$args=array(
'post_type' => array('uslugi'),
'caller_get_posts'=>1,
'posts_per_page'=>1,
'order' => 'ASC',
'kat-uslugi' => 'Nasze Usługi', // how add more categories ??
'showposts' => 4,
);
//query_posts($args);
$my_query = new WP_Query($args);
?>
damian
More information about the wp-testers
mailing list