Support » Plugins » Hacks » query_posts show posts except the ones in taxonomy

  • Hello,
    I have a Custom post type : News and a taxonomy: Accreditations
    On the news page(archive-news.php) i want to show all the news exept the one in the taxonomy/category Accreditations and on another page i want to show only the posts with the taxonomy/category Accreditations.

    I figured out the second part:
    query_posts($query_string .'showposts=3&post_type=n_news&news-category=accreditations&nopaging=0&post_status=publish&orderby=date');

    But i cannot get the first part, could i get some help?

    Here is my taxonomy
    register_taxonomy("news-category", array("n_news"), array("hierarchical" => true, "label" => "News Categories", "singular_label" => "News Category", "rewrite" => true));

  • The topic ‘query_posts show posts except the ones in taxonomy’ is closed to new replies.