Home / admin / Change admin area “pagination” posts per page
  • How to Change admin area “pagination” posts per page

    change-admin-area-pagination-posts-per-page

    Adding this snippet to the functions.php of your wordpress theme will let you adjust the number of posts display within the admin area. By default wordpress will display 20 posts at a time within the admin area but you can change the number for the variable $per_page to display more or less.

    ( example screenshot ) ( click code to copy )

    wordpress snippet : PHP

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

    ( WordPress codex functions, hooks, in this snippet. )

    query, admin_head, add_action, wp,
  • Hi, not sure when this was written, but in the newer versions of WordPress you can change the number of posts/pages to be displayed in the Screen options for posts/pages (top right of the admin panel).
    Hope this is helpful.
    Cheers! :)

    • wp-noob

      Actually it’s been very helpful. Thanks a lot! :)

      • You’re welcome, glad it helped! :)