Is $page a global variable in wordpress?

I am having a problem with a local $page variable, especially when using it in The Loop. Is it a reserved variable of WordPress? Also where can I find a list of all those global variables?

Related posts

2 comments

  1. Yes. It is an “inside the Loop” global.

    $page (int) The page of the post, as specified by the query var page.

    http://codex.wordpress.org/Global_Variables

    It is setup and used by setup_postdata which executes at every iteration of a standard Loop. Though meant for use inside the Loop, the variable would still be set after the Loop to the last data it was given (unless specifically unset and I don’t think it is, but am not swearing to that).

Comments are closed.