WordPress.org

Support

Support » How-To and Troubleshooting » exclude category from $wp_query

exclude category from $wp_query

  • Is there a way to exclude a category from $wp_query?

    If I use !in_category() in the loop, then the counting of the posts is not correct and posts_nav_link() doesn’t work well then.

    If I use query_posts() then the original query is broken.

    So I want the original query but without the posts of 1 category. Is that possible?

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘exclude category from $wp_query’ is closed to new replies.