WordPress.org

Ready to get started?Download WordPress

Forums

Custom query: multiple categories sorted differently (1 post)

  1. dwharrington
    Member
    Posted 3 years ago #

    I run a website using MimboPro at http://www.mayatanfoundation.org.

    I know that I can query posts from a certain category, i.e.:
    query_posts('showposts=4&cat=33&orderby=rand');

    However, what if I want to query posts in a way that would combine different results from different categories in the following way:

    1. Display X number of posts from category "News" in chronological order
    2. And display X number of posts from category "Featured" in random order
    3. "Featured" and "News" would have ideally be alternated, so that a random feature from any date would alternate with a news item in chronological order.

Topic Closed

This topic has been closed to new replies.

About this Topic