WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_query exclude categories not working (5 posts)

  1. cogmios
    Member
    Posted 3 years ago #

    fyi in 3.1. RC4 Trunk this did not work anymore;

    global $wp_query;
    $wp_query->set('cat', '-14,-1172,-867');
    $wp_query->set('posts_per_page', 12);
    $posts = $wp_query->get_posts();
  2. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

    Confirmed. Investigating.

  3. Ryan Boren
    WordPress Dev
    Posted 3 years ago #

    Even in 3.0, using this style is hit-or-miss. It completely circumvents parse_query().

  4. Andrew Nacin
    Lead Developer
    Posted 3 years ago #

  5. cogmios
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags