Title: Change Default Options
Last modified: March 18, 2020

---

# Change Default Options

 *  Resolved [ryan0432](https://wordpress.org/support/users/ryan0432/)
 * (@ryan0432)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/change-default-options-3/)
 * Hi [@tobiasbg](https://wordpress.org/support/users/tobiasbg/),
 * I am now importing tables from local files into my website, most of the things
   work well.
    Just one thing I wonder if I can change, which is the default options.
   Is there a file stored somewhere, maybe a JSON or XML that sets the default check
   boxes that I can make changes to?
 * Thanks in advance.
 * Ryan
    -  This topic was modified 6 years, 4 months ago by [ryan0432](https://wordpress.org/support/users/ryan0432/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/change-default-options-3/#post-12556273)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Sorry, there’s no JSON or XML file for that, you’d need to use a plugin filter
   hook and PHP code:
    [https://github.com/TobiasBg/TablePress/blob/master/models/model-table.php#L911](https://github.com/TobiasBg/TablePress/blob/master/models/model-table.php#L911)
   That filter hook offers an array of an empty table, in which you can set default
   values.
 * Regards,
    Tobias
 *  Thread Starter [ryan0432](https://wordpress.org/support/users/ryan0432/)
 * (@ryan0432)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/change-default-options-3/#post-12558841)
 * Hi [@tobiasbg](https://wordpress.org/support/users/tobiasbg/),
 * Thanks for the help.
    I have tried to change the default values as such: [https://imgur.com/TYO2zGE](https://imgur.com/TYO2zGE)
 * But it doesn’t seem to make any change.
    Then I copy the block of code to functions.
   php, still the same. Can you please let me know where I should place the code
   and where to call get_table_template() ?
 * Thanks
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/change-default-options-3/#post-12559866)
 * Hi,
 * sorry, I was a bit unclear. You’d need to use the filter hook function, i.e.
 *     ```
       add_filter( 'tablepress_table_template', 'ryan0432_tablepress_table_template' );
       function ryan0432_tablepress_table_template( $table ) {
         $table['options']['datatables_sort'] = false;
         $table['options']['datatables_filter'] = false;
         return $table;
       }
       ```
   
 * etc.
    This could go into your theme’s “functions.php” file.
 * Note that these changes only apply to tables that are created or imported after
   adding this code!
 * Regards,
    Tobias
 *  Thread Starter [ryan0432](https://wordpress.org/support/users/ryan0432/)
 * (@ryan0432)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/change-default-options-3/#post-12562998)
 * Hey [@tobiasbg](https://wordpress.org/support/users/tobiasbg/),
 * It works. 😀 Now I have a better idea on how WordPress PHP works.
    Was coming
   from other background and not having enough experience on coding. Thanks a lot
   for helping me out 😀
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/change-default-options-3/#post-12563830)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Change Default Options’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/change-default-options-3/#post-12563830)
 * Status: resolved