Hi,
thanks for your question, and sorry for the trouble.
You are right in that TablePress does not have direct support for the <caption> element. It does however have a filter hook (in “class-render.php”) that can be used to fill the <caption> element. For an example, please see this TablePress Extension:
http://tablepress.org/extensions/table-caption-html-tag/
With that installed and activated, the table name would be added to the <caption> element. Just change the code to eg. 'description' to get the description instead.
Regards,
Tobias
I put the php file floating in the “wp-content/plugins/tablepress” directory and activated it.
With this extension activated, will the generated html code have the <caption> tags automatically for all the tables on the website? Or do I need to tag something in the Table Name field? Or in the Description field?
And when I install updates to the plugin, will I have to reinstall the extension php file?
Thank you for your help with your plugin.
Hi,
Instead of putting the file into the “tablepress” plugin folder, please leave it in its own folder (i.e. simply extract the ZIP file and upload the contained folder to the “wp-content/plugins/” directory). By doing that, you are guaranteed that a plugin update of TablePress will not remove the Extension, so that you will not have to reinstall it then.
All TablePress tables will then have the <caption> tag automatically, with the table name as the content.
Regards,
Tobias
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!