Title: datatables script for multiple tables
Last modified: June 6, 2025

---

# datatables script for multiple tables

 *  Resolved [Peter Leenders](https://wordpress.org/support/users/peterleenders/)
 * (@peterleenders)
 * [1 year ago](https://wordpress.org/support/topic/datatables-script-for-multiple-tables/)
 * I’am using TablePress free and I have 30 plus tables.
   For 10 tables I have some
   datatables code. All 10 tables have the same code.Now I have to copy this code
   to every table.
 * Is there a way to use the datatables code for all 10 tables without copying to
   every table?
   When I change something to the datatables code I have to copy it
   to every table.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [1 year ago](https://wordpress.org/support/topic/datatables-script-for-multiple-tables/#post-18500744)
 * Hi!
 * Thanks for your post and sorry for the trouble!
 * Yes, you would indeed need to copy that to the “Custom Commands” field of those
   tables.
 * Alternatively, you could add this with PHP code in a small custom plugin (so 
   that you would only have one place where changes would be needed). Depending 
   on what you are changing the filter hooks [https://github.com/TablePress/TablePress/blob/3.1.3/controllers/controller-frontend.php#L513-L523](https://github.com/TablePress/TablePress/blob/3.1.3/controllers/controller-frontend.php#L513-L523)
   and [https://github.com/TablePress/TablePress/blob/3.1.3/controllers/controller-frontend.php#L539-L551](https://github.com/TablePress/TablePress/blob/3.1.3/controllers/controller-frontend.php#L539-L551)
   work best. For more specific help with the code for this, I recommend considering
   the [premium support](https://tablepress.org/support/) option that comes with
   the TablePress premium license plans.
 * Best wishes,
   Tobias

Viewing 1 replies (of 1 total)

The topic ‘datatables script for multiple tables’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/datatables-script-for-multiple-tables/#post-18500744)
 * Status: resolved