The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Multiple sorting parameters in query_posts? (1 post)

  1. Doug
    Posted 5 years ago #

    Is it possible to pass multiple orderby values in the query_posts? I want to display the first 3 entries of my products custom post-type, and prioritize to list the ones with higher ratings (a custom field value), but also be random, so it's not showing the same 3 posts every time. Is there a way to do this?

    On the other hand, would it be easier to create a custom taxonomy for the rating, and only query posts from the higher rating categories? But how would I have it check lower ratings if there weren't enough in the highest category?

Topic Closed

This topic has been closed to new replies.

About this Topic