I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same look and the if possible the column sorting too.
|
You came to this in a bad time of changes. Tables in admin are being migrated from the old and scary ways to new shiny Problem is - while classes are already in and being using core code, they are currently not meant for being used otherwise. Proper API for theme/plugin usage is planned, but I think it didn't make it in 3.2 version, so 3.3 (at best). Your options are:
For simple things I'd prefer 1. But for complex stuff 2 is pretty much only way to go, because custom table is very hard to get right when a lot of global variables and other joys of admin side are involved. |
|||||||
|
WP_List_Table. Unfortunately there are not that many resources on how to use it, so you will have to look at existing code for examples. I once asked how to do this with the old code, that question needs an updated answer now. – Jan Fabry May 19 '11 at 9:40