The paged global variable stores the current page number in the pagination, usually of Wordpress archives. It is a query string variable and is set in [wordpress root folder]/wp-includes/template-functions-links.php] if it is not explicitly set.
Wordpress theme authors need not use this global variable directly, following functions are provided to support pagination:
next_posts_link($label='Next Page »', $max_page = 0): displays link for posts later in the orderprevious_posts_link($label='« Previous Page', $max_page = 0): displays link for posts before the currently displayed posts in the orderposts_nav_link($sep=' — ', $prelabel='« Previous Page', $nxtlabel='Next Page »'): displays both the next and previous post links
These functions refer to the next and previous page in the set of archives. These functions can be used in themes to provide links for navigation within the archives. The archives are displayed in multiple scenarios - the usual index, search, month-wise archive, category-wise archive - for that matter any cohesive set for displaying posts together. You can choose to display posts alphabetically instead of chronologically as mentioned in this Wordpress codex document.
$max_num_pages is used to determine the total number of pages in the archive.
Back to full list of global variables.
Technorati tags: paged, pagination, next_posts, previous_posts
Copyright Abhijit Nadgouda.


May 27th, 2006 at 4:39 pm
[...] $paged [...]
July 16th, 2006 at 5:00 pm
[...] max_num_pages represents the number of pages when any Wordpress archive is displayed. It is set using the posts_per_page global variable. It is calculated and set in the functions next_posts_link($label=’Next Page »’, $max_page = 0) and posts_nav_link($sep=’ — ‘, $prelabel=’« Previous Page’, $nxtlabel=’Next Page »’) defined in [wordpress root folder]/wp-includes/template-functions-links.php. [...]
October 23rd, 2007 at 8:14 pm
[...] $paged [...]