WordPress filter hook · part of WordPress core
edit_posts_per_page
A WordPress core filter that 16 plugins also fire themselves, running on 830K+ sites between them.
“This filter is documented in wp-admin/includes/post.php”
How to use edit_posts_per_page
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'edit_posts_per_page', function( $per_page, $post_type ) {
// Change $per_page here.
return $per_page;
}, 10, 2 );Argument names come from Download Monitor's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
16 plugins that fire edit_posts_per_page
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
The Events Calendar600,000+ installs
apply_filters( 'edit_posts_per_page', $this->get_items_per_page( str_replace( '-', '_', static::TABLE_ID . '_per_page' ) ), static::TABLE_ID )common/src/Common/Admin/Abstract_Custom_List_Table.php:267 -
Event Tickets and Registration90,000+ installs
apply_filters( 'edit_posts_per_page', $this->get_items_per_page( str_replace( '-', '_', static::TABLE_ID . '_per_page' ) ), static::TABLE_ID )common/src/Common/Admin/Abstract_Custom_List_Table.php:267 -
Download Monitor80,000+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )src/Admin/class-dlm-admin-list-table.php:199 -
SecuPress with Simple SSL40,000+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )free/classes/common/class-secupress-logs-list-table.php:127 -
Cornerstone20,000+ installs
apply_filters( 'edit_posts_per_page', $posts_per_page )includes/class.content_utilities.php:646 -
Admin Posts Grid40+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )includes/class-wp-posts-list-grid.php:176 -
Admin Live Search20+ installs
apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type )admin/admin-live-search-post-table.php:191 -
Give Me Answer Lite10+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )includes/Tables/class-table-answer.php:42 -
WP Stripe Cart10+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )class.wp-stripe-cart-list-table.php:28 -
JEO Maps10+ installs
apply_filters( 'edit_posts_per_page', $posts_per_page, $this->post_type )includes/storymap/class-storymap.php:228 -
Massoftind Custom Fields & Field Builder10+ installs
apply_filters( 'edit_posts_per_page', 20, $object )helpers/ContentOrder/ContentOrderApplier.php:261 -
Rundiz PostOrder10+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )App/Models/PostsListTable.php:367 -
Recipe Schema10+ installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )inc/recipe-import-post-list.php:97 -
SitePrimedFewer than 10 installs
apply_filters( 'edit_posts_per_page', $per_page, $content_type )includes/content-list-findings.php:69 -
FreexyaFewer than 10 installs
apply_filters( 'edit_posts_per_page', $per_page, $name )modules/Shortcuts/Ordering.php:310 -
Where are my Post TypesFewer than 10 installs
apply_filters( 'edit_posts_per_page', $per_page, $post_type )functions/type-walker.php:81
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.