Title: adding rows programmatically
Last modified: August 28, 2023

---

# adding rows programmatically

 *  Resolved [cloudduster](https://wordpress.org/support/users/cloudduster/)
 * (@cloudduster)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/adding-rows-programmatically/)
 * Hi Tobias,
 * Is it possible to add rows in Tablepress programmatically? If yes, could you 
   point me to the right direction?
 * I was thinking that whenever I added a new page, the save_post will add the title
   to the given Tablepress table.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/adding-rows-programmatically/#post-17006991)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Yes, this is possible, in principle, but there’s no direct API method for this.
 * Thus, you would have to load the data (it will be a two-dimensional array), modify
   it by appending the row, and save it again.
 * For this, you can use the TablePress PHP functions that TablePress uses as well.
   This code shows the process a bit: [https://github.com/TablePress/TablePress/blob/main/controllers/controller-admin_ajax.php#L90-L133](https://github.com/TablePress/TablePress/blob/main/controllers/controller-admin_ajax.php#L90-L133)
 * Regards,
   Tobias

Viewing 1 replies (of 1 total)

The topic ‘adding rows programmatically’ 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: [2 years, 7 months ago](https://wordpress.org/support/topic/adding-rows-programmatically/#post-17006991)
 * Status: resolved