WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/get comment pages count"

(Reorganized and fleshed out)
(Notes: must be in the loop)
Line 17: Line 17:
   
 
== Notes ==
 
== Notes ==
  +
  +
Typically you cannot use this function before the [[The_Loop]] has started.
   
 
== Change Log ==
 
== Change Log ==

Revision as of 03:45, 15 March 2013

This page is marked as incomplete. You can help Codex by expanding it.

Description

Calculate the total number of comment pages.

Usage

<?php get_comment_pages_count$comments$per_page$threaded); ?>

Parameters

$comment
(array) (optional) array of comment objects.
Default: $wp_query->comments
$per_page
(integer) (optional) comments per page.
Default: null
$threaded
(boolean) (optional) control over flat or threaded comments.
Default: null

Return Values

(integer) 
Number of comment pages.

Examples

Notes

Typically you cannot use this function before the The_Loop has started.

Change Log

Since: 2.7.0

Source File

get_comment_pages_count() is located in wp-includes/comment.php.

Related