WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 trying to grab number of comments to display per page. So far unsuccessful, looking for something similar to this $wp_query->max_num_pages; Thanks.

share|improve this question
up vote 3 down vote accepted

From quick look at core that would probably be get_option('comments_per_page').

However WP functions just use this internally, why not just let them take care of it? You are not describing why do you need to handle this directly.

share|improve this answer
I'm using paginate_comments_links() function and I want to add disabled Next link when user hits last page of comments. To do that I need number of total comments pages and by getting number of comments per page I will be able to work out total number of comments pages. – Ed T. Dec 22 '12 at 18:25

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.