[resolved] Finding <!--nextpage--> in a post or page? (4 posts)

  1. L D
    Posted 6 years ago #

    Hello, I was wondering if it's possible to find out what page a post is on at any given time.

    For example, is it possible to call something like:

    if(post_current_page() == 1) {
    // do something if we are on the first "page" of this particular post.
    } else if(post_current_page() == 2) {
    // do something else if we are on the second "page" of this particular post.

    I've found that my post avatar is displaying at the beginning of EVERY page of a post that has been split up with <!--nextpage-->. I don't want that. I only want the thumbnail to show on the first page of a post that has been split up into several pages. Is that possible? How would I do that? Thanks!

  2. Michael
    Forum Moderator
    Posted 6 years ago #


    $page holds the number of the (paginated) page.

  3. Jonas Grumby
    Posted 6 years ago #

    You can probably do something with Conditional Tags.

  4. L D
    Posted 6 years ago #

    Thank you both, it works! :D And for anyone else who's trying to figure it all out, here's another link that will shed some light on the mystery:


Topic Closed

This topic has been closed to new replies.

About this Topic