WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Function to access page number? (3 posts)

  1. Orin
    Member
    Posted 8 years ago #

    If trying to get the page number, is there a function to do this? Or would I need to do something complicated like so:

    if is_paged('2') $pagenum = 2;
    if is_paged('3') $pagenum = 3;
    ...

  2. Orin
    Member
    Posted 8 years ago #

    ...Since that's not possible, as I found out, allow me to rephrase: is there a method to access the current page number?

  3. Orin
    Member
    Posted 8 years ago #

    Gimme enough times trying and I'll eventually hit on it... the variable I was looking for was '$paged', everyone, '$paged'. All of you who couldn't answer within the two hour limit — you just failed WordPress challenge.

Topic Closed

This topic has been closed to new replies.

About this Topic