admin管理员组

文章数量:1122832

In the admin panel (backend) when you go to "posts" it shows you a pagination (in my case with 29 posts per page).

Is it possible to change to posts per page number for a specific post type?

Thanks.

In the admin panel (backend) when you go to "posts" it shows you a pagination (in my case with 29 posts per page).

Is it possible to change to posts per page number for a specific post type?

Thanks.

Share Improve this question edited Sep 19, 2016 at 8:25 Ben asked Sep 19, 2016 at 7:52 BenBen 3691 gold badge5 silver badges15 bronze badges 2
  • Do you mean for a custom post type query in the backend or the frontend ? – birgire Commented Sep 19, 2016 at 8:08
  • I mean the backend. – Ben Commented Sep 19, 2016 at 8:23
Add a comment  | 

1 Answer 1

Reset to default 6

This is a wordpress core feature on most (all?) list type admin screen, you just go to the "screen options" (right below the admin bar) and change the "number of items per page" setting. This setting is stored per user per screen therefor each user can customize it to whatever works best for him.

IMO this is all you need, and there is no need to do any coding, but if you want to have different default value than 20, you should investigate where the value is saved in the user meta and set it upon plugin activation.

本文标签: Is it possible to change the admin posts per page view