On this page
apply_filters( 'edit_posts_per_page', int $posts_per_page, string $post_type )
Filters the number of posts displayed per page when specifically listing “posts”.
Parameters
$posts_per_pageint-
Number of posts to be displayed. Default 20.
$post_typestring-
The post type.
Source
File: wp-admin/includes/post.php. View all references
$posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type );
Related
Used By
| Used By | Description |
|---|---|
| WP_Screen::render_per_page_options() wp-admin/includes/class-wp-screen.php | Renders the items per page option. |
| wp_edit_posts_query() wp-admin/includes/post.php | Runs the query to fetch the posts for listing on the edit posts page. |
| WP_Posts_List_Table::prepare_items() wp-admin/includes/class-wp-posts-list-table.php |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/edit_posts_per_page