Differenciate wordpress multiple pages

Discussion in 'WordPress' started by Garcia, Jan 7, 2010.

  1. #1
    Hi,

    Here is my requirement:

    Let's say you have a multi-paged article in your blog. The article has 5 pages. On each page I have to display the current page number (without link). How to get the current page number on multi paged article?

    Thanks
     
    Garcia, Jan 7, 2010 IP
  2. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depends on how you;re doing these multiple pages. Care to give some specifics? Are these actually multiple posts that you;re linking somehow? Are you using the "<-nextpage->" tag?
     
    theapparatus, Jan 8, 2010 IP
  3. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #3
    I think this will help you:

    
    <?php $page_number = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    
    Code (markup):
    $page_number is the number of the current page!!!
     
    s_ruben, Jan 8, 2010 IP