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:

functions.php
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.

  1. The Events Calendar icon 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
  2. Event Tickets and Registration icon 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
  3. Download Monitor icon Download Monitor80,000+ installs apply_filters( 'edit_posts_per_page', $per_page, $post_type ) src/Admin/class-dlm-admin-list-table.php:199
  4. SecuPress with Simple SSL icon 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
  5. Cornerstone icon Cornerstone20,000+ installs apply_filters( 'edit_posts_per_page', $posts_per_page ) includes/class.content_utilities.php:646
  6. Admin Posts Grid icon Admin Posts Grid40+ installs apply_filters( 'edit_posts_per_page', $per_page, $post_type ) includes/class-wp-posts-list-grid.php:176
  7. Admin Live Search icon Admin Live Search20+ installs apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type ) admin/admin-live-search-post-table.php:191
  8. Give Me Answer Lite icon Give Me Answer Lite10+ installs apply_filters( 'edit_posts_per_page', $per_page, $post_type ) includes/Tables/class-table-answer.php:42
  9. WP Stripe Cart icon WP Stripe Cart10+ installs apply_filters( 'edit_posts_per_page', $per_page, $post_type ) class.wp-stripe-cart-list-table.php:28
  10. JEO Maps icon JEO Maps10+ installs apply_filters( 'edit_posts_per_page', $posts_per_page, $this->post_type ) includes/storymap/class-storymap.php:228
  11. Massoftind Custom Fields & Field Builder icon Massoftind Custom Fields & Field Builder10+ installs apply_filters( 'edit_posts_per_page', 20, $object ) helpers/ContentOrder/ContentOrderApplier.php:261
  12. Rundiz PostOrder icon Rundiz PostOrder10+ installs apply_filters( 'edit_posts_per_page', $per_page, $post_type ) App/Models/PostsListTable.php:367
  13. Recipe Schema icon Recipe Schema10+ installs apply_filters( 'edit_posts_per_page', $per_page, $post_type ) inc/recipe-import-post-list.php:97
  14. SitePrimed icon SitePrimedFewer than 10 installs apply_filters( 'edit_posts_per_page', $per_page, $content_type ) includes/content-list-findings.php:69
  15. Freexya icon FreexyaFewer than 10 installs apply_filters( 'edit_posts_per_page', $per_page, $name ) modules/Shortcuts/Ordering.php:310
  16. Where are my Post Types icon 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.