Ready to get started?Download WordPress


[resolved] Get current page number for paginated posts (4 posts)

  1. Scott Bressler
    Posted 4 years ago #

    I'm trying to get the current page and the total number of pages for paginated posts, but the only method I see that works toward that is wp_link_pages, and that's not enough for what I want. Is there some other method that will help me print out at the top of page 2 for a paginated post, (Page 2 of 2)?


  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    <?php echo '(Page '.$page.' of '.$numpages.')'; ?>

    the global variables $page and $numpages are used in here:

  3. Scott Bressler
    Posted 4 years ago #

    Thanks for the quick response! Nice catch - didn't notice those variables.

  4. Daniele Raimondi
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic