max_num_pages

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.

WordPress uses this global variable internally to create the next and previous links for navigation in an archive. Plugin and theme authors need not access this global variable directly.

Back to full list of global variables.

Technorati tags:

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: