posts_per_page

WordPress allows configuration for setting the number of posts to be displayed whenever an index archive (the typical homepage) or other archives like category or monthly archives are displayed. This option can be configured in the Blog Pages field Reading tab under Options menu in the administration User Interface. Note that there is a separate field for configuration number of posts to be displayed for syndication (feeds).

posts_per_page is set in the method get_posts of WP_Query.

Plugin and theme authors need not access this global variable directly. WordPress uses it internally to calculate the number of posts to be displayed.

Since the same setting is used for all archives Matt Read has developed a plugin where posts per page setting can be set for different types of archives, e.g., search, category, home, monthly, yearly, etc.

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: