Forums

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

  1. berchman
    Member
    Posted 10 months 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

Reply

You must log in to post.

About this Topic