To use this class you have to require the class first.
require_once("wp-table-class.php");
load the class inside your page:
$WPTable = new wp_table_class;
Now the class is loaded you can use it like this:
$WPTable->set_columns(array(
'ID' => 'ID',
'user_login' => 'Username',
'user_nicename' => 'Name',
'user_email' => 'Email',
'user_url' => 'Url'
));
$WPTable->set_sortable_columns(array('ID' => array('ID', false)));
$WPTable->prepare_items("SELECT * FROM wp_users");
To display the table you have to set the display, the display can be set inside divs.
$WPTable->display();
This is all you have to know to create a wordpress table
-
Notifications
You must be signed in to change notification settings - Fork 0
grebbekevin/wp-table-class
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published