WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Finding if <!--nextpage--> exist (4 posts)

  1. uxte
    Member
    Posted 5 years ago #

    Hey everybody,

    Is there a way of finding if the quicktag "<!--nextpage-->" exist in the content of a post/page?

    Hope someone can help.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    In the loop, check the $numpages global variable. If it's greater than one, then the post has multiple pages.

  3. uxte
    Member
    Posted 5 years ago #

    Great Otto42 thanks for the hint ;)

    If anybody's looking for the same here is the code:

    <?php
    	if ( $numpages > '1' ) :
    	echo $numpages;
    	else :
    	echo no pages;
    	endif;
    ?>
  4. omgitztrey
    Member
    Posted 5 years ago #

    So does that mean we can't just type "<!--nextpage-->" to create multiple Post pages?

Topic Closed

This topic has been closed to new replies.

About this Topic