Ive been trying to figure this out for three days now, even using solutions on this site. I still cant get this working.
I have a wordpress loop that uses a filter to show posts by post type. Now the post type is called “case-studies” Thus all the posts in the type case studies are shown.
But i need to hide a specific taxonomy term from this loop. The taxonomy is called “sectors” and the term is “healthcare”. Ive tried all manner of combinations but still cant get this. I need this pretty urgent. Anyone who can help would save my life.
Here is the query and the loop
<?php
// The Query
$the_query = new WP_Query( 'post_type=case-studies&posts_per_page=-1' );
// The Loop
while ( $the_query->have_posts() ) :
$the_query->the_post();
?>
I dind´t try it but you could just make a query calling only the terms you want, you could previously populate the terms array listing all the terms on the taxonomy and excluding the one you want, i think this is a little hacky it should be another straight forward way to do it but give it a try since it is a case of life or dead =).
source: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
Try this one:
ok then try this one it will extract your terms dinamicaly and exclude the term you dont want, i didn´t check if it is working but this is the logic, please check for sintax errors.