Support » Fixing WordPress » Finding if <!–nextpage–> exist

  • Resolved uxte

    (@uxte)


    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)

    (@otto42)

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

    uxte

    (@uxte)

    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;
    ?>
    omgitztrey

    (@omgitztrey)

    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 ‘Finding if <!–nextpage–> exist’ is closed to new replies.