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

Does anyone know a good way to get the count number or position of a comment under a post?

In the known comment array there is only the related_post_ID not the relative number in the affected post.

Of course within a comment loop I can make some $i++ stuff, but if i only got the ID of a comment - how do i get the "position" in all comments of its related posting?

Is there a WordPress function for this?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.