2

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.

4

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.

1
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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