How to list ALL Pages in the dashboard?

I’m wanting to find a way to have all pages listed without paging and to do so in a method that isn’t going to be over-written when I update WordPress, i.e. in the form of a hook.

The page is in the administration:
all pages

Read More

With all the pages being listed I can then use javascript to do collapsing to show/hide subpages, I’m not phased about load times of the page or anything, just cant have this method usable if paging is also used, all pages need to be listed on 1 page.

As I’m wanting to do this in the admin area, I’m not even sure if this is do-able without breaking when updating.

Related posts

Leave a Reply

2 comments

  1. If that listing has too many pages, maybe you’ll run into troubles.

    You probably already know that this can be set in the Screen Options of the page http://example.com/wp-admin/edit.php?post_type=page.

    If you try to put a really high value there, this warning pops up and the system doesn’t accept it:

    1500 pages

    But the following permanently sets this value to 2000.
    I don’t have more than 999 pages to test if that limit that WordPress is warning about will be overriden or not, but the 2k shows up after refreshing the page, and keeps there if you try to lower it.

    add_filter( 'get_user_metadata', 'pages_per_page_wpse_23503', 10, 4 );
    function pages_per_page_wpse_23503( $check, $object_id, $meta_key, $single )
    { 
        if( 'edit_page_per_page' == $meta_key )
            return 2000;
    
        return $check;
    }