最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

uploads - How to limit the number of images displayed in the media window?

programmeradmin3浏览0评论

I have a lot of images in my website, so when I open wp-admin/upload.php the server slow down. Would be possible to display only 50 images per time?

I saw there is this similar question, but it works only for the "set featured image" popup.

I would like to apply the limit also to the upload.php window.

How can I achieve that?

Kind regards

I have a lot of images in my website, so when I open wp-admin/upload.php the server slow down. Would be possible to display only 50 images per time?

I saw there is this similar question, but it works only for the "set featured image" popup.

I would like to apply the limit also to the upload.php window.

How can I achieve that?

Kind regards

Share Improve this question edited Dec 17, 2021 at 22:45 FS-GSW 3041 silver badge8 bronze badges asked Dec 17, 2021 at 9:47 sfarzososfarzoso 498 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

maybe this other similar question (with a good answer) can help you. Change default screen option value for media items per page (in media library)

And the filter to use is :

function my_edit_media_per_page(){
    $media_per_page = 200; //or whatever you want
    return $media_per_page;
}

add_filter( 'upload_per_page', 'my_edit_media_per_page', 10, 3 );
发布评论

评论列表(0)

  1. 暂无评论