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.

1 Answer 1


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.

  • 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, 2012 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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