WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Since WP 3.1, all tables are created as a subclass of 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
up vote 2 down vote accepted

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 List Tables API using subclasses of WP_List_Table.

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:

  1. Do custom table, reuse CSS styling from core. Long run - leave as is or recode when List Table API is implemented and finalized.

  2. Extend appropriate WP_List_Table class with your own and use that. Long run - likely watch it explode at every following WP version from here until List Table API is implemented and finalized.

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.

share|improve this answer
This was discussed in the WordPress developer chat meeting of May 4th 2011, discussing the status of the 3.2 release. The most important line there comes from Marc Jaquith: "We'll do another release where list table API is "off limits" to third parties because it might change. Not the end of the world." – Jan Fabry May 19 '11 at 10:25
Thanks for all the infos. And about columns sorting, is there a relatively easy way to implement it ? – mike23 May 19 '11 at 13:12
@mike23 via List Tables API sortable tables are relatively simple, no idea how complex it is with custom table. – Rarst May 19 '11 at 13:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.