Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to get all of the comments for a given post and return them in order by a meta_key's value desc high to low.

Doesnt look like i can do this with get_comments() like i would like to. This will give me the comments for the post but not ordered like i would like to see.

Any help with this would be great.

share|improve this question

1 Answer 1

From the look at code WP_Comment_Query class, used internally by get_comments() allows orderby argument to be set to 'meta_key' string to sort by key in argument of same meta_key name.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.