Skip to content

grebbekevin/wp-table-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

wp-table-class

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages