WordPress.org

Ready to get started?Download WordPress

Forums

query_posts show posts except the ones in taxonomy (1 post)

  1. dantdr
    Member
    Posted 3 years ago #

    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?
    Thanks,
    Dan

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

Topic Closed

This topic has been closed to new replies.

About this Topic