WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.