Support » How-To and Troubleshooting » [Resolved] Finding if <!–nextpage–> exist

[Resolved] Finding if <!–nextpage–> exist

  • Hey everybody,

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

    Hope someone can help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)


    WordPress.org Tech Dude

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

    Great Otto42 thanks for the hint 😉

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

    	if ( $numpages > '1' ) :
    	echo $numpages;
    	else :
    	echo no pages;

    So does that mean we can’t just type “<!–nextpage–>” to create multiple Post pages?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Finding if <!–nextpage–> exist’ is closed to new replies.