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 am making a custom wordpress theme and when I add a comment to a post and retrieve the number of comments using get_comments_number() the number does not change.

I do know the function works because for the first comment that gets preinstalled with wordpress it returns 1. but somehow the number does not increment if I add additional comments.

Is there a way to manually increment this number? Does anyone know what the problem might be?

Thanks for your suggestions!

share|improve this question
up vote 0 down vote accepted

Approving them in the admin console solved my problem.

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.