WordPress.org

Ready to get started?Download WordPress

Forums

How do I avoid posts from the same category in my query? (1 post)

  1. berchman
    Member
    Posted 3 years ago #

    I have a query that works well and looks like this.

    query_posts("showposts=2&tag=featured&orderby=rand");

    However, sometimes the results give me posts from the same category.

    How can I avoid the 2 posts being from the same category?
    I always want them to be from different categories.

    Let me know if you have any questions.
    Thanks,
    Bert

Topic Closed

This topic has been closed to new replies.

About this Topic