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 need a solid solution for checking if a post has pagination or not, regardless of the number of current page in the pagination, and even if the post is in the first page of the pagination. the check is inside the loop.


share|improve this question
up vote 6 down vote accepted

Just check for the global $numpages variable:

global $numpages;
if ( is_singular() && $numpages > 1 ) {
    // This is a single post
    // and has more than one page;
    // Do something.
share|improve this answer
so simple... arrrgh... – Asaf Chertkoff Jul 4 '11 at 17:48

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.