edit_{$post_type}_per_page WordPress Filter Hook

The edit_{$post_type}_per_page hook allows you to change the number of items that are shown per page when editing a post type. This can be useful if you want to show more or fewer items on the screen at one time.

apply_filters( "edit_{$post_type}_per_page", int $posts_per_page ) #

Filters the number of items per page to show for a specific ‘per_page’ type.


Description

The dynamic portion of the hook name, $post_type, refers to the post type.

Possible hook names include:

  • edit_post_per_page
  • edit_page_per_page
  • edit_attachment_per_page

Top ↑

Parameters

$posts_per_page

(int)Number of posts to display per page for the given post type. Default 20.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More