I have the following code that lists all the posts from the custom post type “download”.
I would like to exclude 2 specific categories under a custom taxonomy…
(the taxonomy is called “download_category” and the categories i want to hide are called “free-beats” and “sold”)
here is the code i have
<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('post_type=download&showposts=-1'); ?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
I tried adding &download_category=-4 (4 is the id of the free-beats category) and it still didn’t work…..
any help would be much appreciated
From official documentation: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters