Return 4 or 5 star post at random?
-
Hi all,
I have looked through this support forum but was unable to find what im looking for so apologies if ive missed the answer.
I am developing a query_posts arguments list to return a random custom post type with a rating of 4 or above.
My current code looks like:
$query_args['post_type'] = 'recipes'; $query_args['post_status'] = 'publish'; $query_args['r_sortby'] = 'highest_rated'; $query_args['r_orderby'] = 'rand'; $query_args['posts_per_page'] = '1'; query_posts($query_args);
This is returning the highest rated recipe. How can I amend to only return a random 4/5 star recipe?
Thanks very much.
- The topic ‘Return 4 or 5 star post at random?’ is closed to new replies.