A powerful WordPress plugin that creates responsive, sortable, and filterable tables using shortcodes. Built on the robust DataTables jQuery plugin with Bootstrap styling.
- ✅ Sortable columns with customizable default sorting
- ✅ Search filtering across all columns
- ✅ Column-specific filtering options
- ✅ Export to CSV, Excel, PDF, and print
- ✅ Responsive tables that work on all devices
- ✅ Custom styling options and themes
- ✅ Pagination with customizable page lengths
- ✅ State saving (remembers user's sorting preferences)
- Download the plugin ZIP file
- Go to WordPress Admin > Plugins > Add New > Upload Plugin
- Browse for the ZIP file and click "Install Now"
- Activate the plugin through the 'Plugins' menu
Insert a table using the sortable_table shortcode:
[sortable_table data="your_data_source"]
Replace your_data_source with the appropriate data source or parameters as defined in the plugin documentation.
You can customize the appearance of the tables by modifying the CSS in public/css/sortable-tables-public.css.
The shortcode accepts multiple parameters to customize your tables:
[sortable_table data='[{"Product": "Widget A", "Price": "$10.99", "Stock": "25"},{"Product": "Widget B", "Price": "$14.99", "Stock": "10"}]' export="true" theme="striped" caption="Product Inventory" ]
| Parameter | Options | Default | Description |
|---|---|---|---|
data |
JSON array | required | Table data in JSON format |
export |
true/false | false | Enable export buttons (CSV, Excel, PDF, etc.) |
responsive |
true/false | true | Make table responsive on mobile devices |
paging |
true/false | true | Enable pagination |
searching |
true/false | true | Enable search functionality |
state_save |
true/false | false | Remember user's sorting and filtering preferences |
page_length |
number | 10 | Number of rows per page |
default_sort |
[column, order] | [] | Default sorting (column index and 'asc' or 'desc') |
column_filters |
true/false | false | Enable per-column filtering |
theme |
string | default | Table styling theme (options: default, dark, striped, bordered, hover, striped-hover) |
caption |
string | '' | Table caption/title |
[sortable_table data='[{"Name": "John", "Sales": "1200", "Region": "North"},{"Name": "Mary", "Sales": "1800", "Region": "South"}]' default_sort='[1,"desc"]' ]
For support, please visit the plugin's support forum or contact the developer.
Table not displaying correctly?
- Ensure your JSON data is properly formatted
- Try using a JSON validator to check your data structure
- Check browser console for JavaScript errors
Export buttons not showing?
- Make sure
export="true"is set in your shortcode
Need help?
- Open an issue on our GitHub repository
This plugin is built using:
- DataTables jQuery plugin
- Bootstrap framework
- 1.0.0: Initial release of the Sortable Tables Plugin.