Showing posts with label 10. Show all posts
Showing posts with label 10. Show all posts

Monday, January 31, 2011

Increase the number of entries in Media Library of Wordpress

Have lots of images? Don't want to paginate? Using Faster Image Inserter?

Change from 10 to whatever:

back up wp-admin/includes/media.php

find this:

$start = ( $_GET['paged'] - 1 ) * 10;
if ( $start < 1 )
$start = 0;
add_filter( 'post_limits', create_function( '$a', "return 'LIMIT $start, 10';" ) )


and this:

$page_links = paginate_links( array(
'base' => add_query_arg( 'paged', '%#%' ),
'format' => '',
'prev_text' => __('«'),
'next_text' => __('»'),
'total' => ceil($wp_query->found_posts / 10),
'current' => $_GET['paged']
));


and change 10 to 50 or 100 or ...

Blog Archive