• Resolved freeriders

    (@freeriders)


    Greetings

    I’m currently doing a template for a page

    the content of my page is splited in different page’s parts with <!nextpage>, I’m using wp_link_pages to paginate/navigate within the page’s parts.

    I try to find out when I’m on the last part from the page split, so that I can make appear a special text..

    in some other words, I try to find out how many parts exist so that I can know where I’m.

    I know the variable $page, this is fine to know in which part I’m currently but not if that’s the last one

    I’ve deeply searched the codex, but I have not been very successful on this one..

    maybe one of you guys have some hints?

    thank you in advance

    kisses

    Steffy

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael

    (@alchymyth)

    (in the loop)
    the variable $numpages holds the number of split page parts;

    and the variable $page holds the number of the actual subpage.

    example:
    <?php if($numpages > 1) echo 'you are on subpage '.$page.' of '.$numpages.' subpages'; ?>

    Thread Starter freeriders

    (@freeriders)

    Alchymyth you rock !!!!

    you saved my day, I was not aware of the numpage variable, you truly rock !!!

    Thank you again very very much

    Anonymous User 5746546

    (@anonymized-5746546)

    Yes, thanks for the info! It really did help me! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Find out the last part of a page/post’ is closed to new replies.