Hi,
thanks for your question, and sorry for the trouble.
You are right, TablePress (intentionally) caches the output of its Shortcodes (for 24 hours). This is no problem at all, except if tables contains “dynamic” content — like that from another Shortcode.
For tables that contain other Shortcodes, it’s therefore a wise idea to turn off caching of that table. To that, just extend the Shortcode of that table with the cache_table_output
parameter, i.e.
[table id=213 cache_table_output=false /]
Regards,
Tobias
Hi,
another thing: It is possible to turn off caching for all TablePress Shortcodes with a small piece of code (see below), but I don’t really recommend that. Turning it off individually via the Shortcode parameter is much better.
To turn caching of for all tables, you could add the following code your theme’s “functions.php” file or into a small new plugin:
add_filter( 'tablepress_table_render_options', 'tablepress_turn_off_table_caching', 10, 2 );
function tablepress_turn_off_table_caching( $render_options, $table ) {
$render_options['cache_table_output'] = false;
return $render_options;
}
Regards,
Tobias
Excellent, that answers the question. Thanks Tobias! And excellent plugin!
Hi,
sure, no problem! You are very welcome!
Great to hear that you like the plugin so much!
In case you haven’t, please rate it here in the plugin directory then. Thanks!
Best wishes,
Tobias
Already did 🙂 Thanks again!
Hi,
ah, thanks! 🙂 I really appreciate it!
Best wishes,
Tobias
thanks ThobiasBg. It really helped me alot 🙂
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 here in the plugin directory. Thanks!