Integrating DataTables and WordPress
Integrating DataTables and WordPress
josephidube
Posts: 1Questions: 0Answers: 0
I am creating a wordpress theme where I'm pulling a bunch of custom fields into a table that I would like to be able to sort with DataTables. Because I'm using custom fields I'm unable to use the tablepress plugin.
I've tried to install the traditional jquery plugin but it's not working. The js files are all enqueued and working correctly, but my tables haven't been pressed yet!
Anyone have any suggestions?
I've tried to install the traditional jquery plugin but it's not working. The js files are all enqueued and working correctly, but my tables haven't been pressed yet!
Anyone have any suggestions?
This discussion has been closed.
Replies
I've done this a number of times (none are public right now). My method has been:
1) create a basic "functionality" plugin that loads the scripts for datatables.js
2) create custom post type
3) create custom fields with custom meta boxes
4) create an archive page template for the custom post type integrating datatables
I use the Core Functionality Plugin (http://www.billerickson.net/core-functionality-plugin/) from Bill Erickson to create custom post type and the custom meta boxes to attach to the post type (these generate custom fields).
Let me know if you need some help with this. I've been meaning to write a tutorial on this and this may give me the motivation to do this.