# Default Number of Items in Admin Lists

> Shows more (or fewer) posts per page in admin lists for everyone who has not chosen their own number in Screen Options.

- Type: PHP
- Runs: Admin only
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: admin, list-table, pagination
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/admin-list-items-per-page/

## Code

```php
// Items per page when a user has not set their own value in Screen Options.
$wpide_admin_per_page = 50;

add_filter( 'edit_posts_per_page', function ( $per_page, $post_type ) use ( $wpide_admin_per_page ) {
    $own = get_user_option( "edit_{$post_type}_per_page" );

    return empty( $own ) ? $wpide_admin_per_page : $per_page;
}, 10, 2 );
```

## Notes

Very high values make list screens slower on large sites.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Default Number of Items in Admin Lists" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
