Change default screen options posts per page value in WordPress Admin through functions.php

Thanks in advance for any support you can provide, I really appreciate it!
Trust me, I spent the last hour trying to google this, but most posts on this topic apply to very old versions of WordPress..

Here is what I am trying to achieve. I have a multi author WordPress blog with a bunch of not too savy users when it comes to WordPress… To make their life easier, I would like to change the default number of posts displayed in the admin back end (for all custom post types) to a 100 by default (existing and new users, ideally), rather than the default 20.

Read More

I would like to accomplish this thorugh the functions.php which I believe is the cleanest way to achieve this. I definitely don’t want to install a plugin to do this…

I run WP 3.8 and PHP 5.3 with a pretty normal Apache configuration.

Thanks for any help you can provide.

TH

Related posts

Leave a Reply

1 comment

  1. You can change the number of posts/pages to be displayed in the Screen options for posts/pages (top right of the admin panel).

    Of with functions.php

    function admin_pagination(){
        global $wp_query;
        $per_page = 5;
        $wp_query->query('showposts='. $per_page);
    }    
        add_action('admin_head', 'admin_pagination');