WordPress.org

Ready to get started?Download WordPress

Forums

Increase number of pages/posts in "Edit Posts" and "Edit Pages" page (17 posts)

  1. willroy
    Member
    Posted 5 years ago #

    Does anyone know how to increase the number of pages / posts displayed on the "Edit Pages" or "Edit Posts" pages within the admin area.

    Preferably without hacking, ideally there is a plug in, I have searched high and low with no avail.

    Many thanks

    Will

  2. LayzTigr
    Member
    Posted 5 years ago #

    I am very interested in the answer as well. With a lot of pages, displaying 20 per page is not very handy. Of course there is the page search function, but then you loose track of the hierarchy.

    Anyone?

  3. pauliusuza
    Member
    Posted 5 years ago #

    1. Log in to your blogs admin panel
    2. In the browser address bar enter: http://www.<yourblogurl>.com/wp-admin/options.php
    3. A huge list of options should open
    4. Find "default_post_edit_rows" and change the value from 10 to whatever you like
    5. Scroll to the very bottom of the page and click "Save Changes"

    Ta Daa!

  4. jcow
    Member
    Posted 5 years ago #

    "default_post_edit_rows"

    That doesn't appear to work anymore.

    For one thing. Newer versions of WordPress show 15 posts, not 10 anyway, changing that value doesn't seem to have any effect on the admin section...

    Changing the amount of pages shown is easy, but I still can't find a way to change the amount of posts shown...

    To change the amount of posts shown, you can use a plugin I illustrated at the bottom of this thread:
    http://wordpress.org/support/topic/145133

    Save that text to a .php file, change the value (500) to whatever you number of pages you want to show, upload it, and activate it.

  5. jcow
    Member
    Posted 5 years ago #

    $wp_query->query('showposts=25');

    Add that to the Admin header, and it will change the posts pagination to 25 per page.

    Turns out is extremely simple. I was attacking it from the point of view of changing the Page pagination, it is classic Posts though, which makes sense.

    So an update to that plugin would be:

    <?php
    /*
    Plugin Name: Change Admin Pagination
    Description: Change the pagination values in the Admin section for Posts and Pages
    Version: .2
    Author: Jake Snyder
    */
    
    function change_admin_pagination(){
    		global $per_page, $wp_query;
    	$per_page = 500;
    	$posts_per_page = 25;
    	$wp_query->query('showposts='. $posts_per_page);
    }
    add_action('admin_head', 'change_admin_pagination');
    ?>
  6. urbanor
    Member
    Posted 5 years ago #

    @jcow Your plugin works to increase the number of posts/pages per page, but in doing so, it breaks the date and category filter options.

  7. Mindshare Studios, Inc.
    Member
    Posted 5 years ago #

    Anyone have a more elegant solution for this? It would be great if we could just add that option to the query string... like:

    /edit-pages.php?per_page=500

  8. Bart van Poll
    Member
    Posted 5 years ago #

    Thanks @jcow for the good work!

    Really a pity that it breaks the other filters. That makes it useless for me unfortunately...

  9. plroper
    Member
    Posted 5 years ago #

    This may be resolved, but here's the way I resolved it:

    Open wp-admin/includes/template.php

    Navigate to line 530

    Change the $per_page value

    I hope this helps.

  10. plroper
    Member
    Posted 5 years ago #

    You may also try searching for the function "page_rows" within the template.php file. It may not be on line 530 if you are running a different version of WordPress.

  11. alanft
    Member
    Posted 5 years ago #

  12. syncbox
    Member
    Posted 5 years ago #

    Thanks goodness for Scott Reilly - he makes some of the most useful WordPress plugins out there! His Get Custom Fields plugin rocks!

    Thanks, SCOTT!

    And thanks for this solution to a major oversight in the 2.7x upgrade...

  13. sarath26
    Member
    Posted 4 years ago #

    I had to recently work on the same and found a solution, i use the wordpress 2.8.3 so to basically change this value

    you go to get the file from wp-includes/default-widgets.php

    look for this code:

    $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts') : $instance['title']);
    		if ( !$number = (int) $instance['number'] )
    			$number = 10;
    		else if ( $number < 1 )
    			$number = 1;
    		else if ( $number > 15 )
    			$number = 15;

    change the 15 to any number. then go back to admin / appearance /widgets

    look for the side bar or where you have put the Recent post widget, change to the number of posting you want to display.

    This worked for me. I changed these values to 50 and at the admin level to 50 to accommodate future posts.

    Hope this is handy for you guys

  14. João Leitão
    Member
    Posted 4 years ago #

    greetings!

    I just solved the problem adding this

    function change_admin_pagination(){
    		global $per_page, $wp_query;
    	$per_page = 500;
    	$posts_per_page = 25;
    	$wp_query->query('showposts='. $posts_per_page);
    }
    add_action('admin_head', 'change_admin_pagination');

    to the admin-header inside code.

    thank you jcow

  15. freelance08
    Member
    Posted 4 years ago #

    FYI, this is now controllable within the core WordPress installation, via the "Screen Options" menu on the Edit Posts and Edit Pages pages. Hooray!

  16. transitionpete
    Member
    Posted 4 years ago #

    freelance08 said: FYI, this is now controllable within the core WordPress installation, via the "Screen Options" menu on the Edit Posts and Edit Pages pages. Hooray!

    I had gone in to increase the number of posts in the POSTS > EDIT SCREEN OPTIONS subpanel and now I see NOTHING on the /WP-ADMIN/EDIT.PHP page!!!

    I had increased from the default 20 posts to 400 and the resulting refresh draws a blank page. Where and how can I fix this? What, if any, is the limit for the number of posts for this function?

  17. transitionpete
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic