Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    this is not that easy right now, actually. Basically, this is because <caption> can only be used inside a <table> element, and not outside, like the current <h2>.
    This means, that you will need to use a plugin filter hook to achieve this. Now, this plugin filter hook was only added to the plugin a few weeks ago (http://wordpress.org/support/topic/plugin-wp-table-reloaded-feature-request-filter-for-table-caption), so it’s not yet available in the release version of the plugin. You’ll actually need to make a modification to a plugin file first. (This is okay here, as the code will be in the plugin in the future, as well.)
    The relevant change that you need to apply to the “render.class.php” is here: https://github.com/TobiasBg/WP-Table-Reloaded/commit/d65d9847286c4bcac95c63f4cd27b74037193ad5

    After that, you can use the wp_table_reloaded_table_caption_arg hook to return the desired caption (probably the table name, which gets passed as the second parameter of the hook) in a <caption> tag. Additionally, the “Print table name” checkbox would need to be unchecked.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-Table Reloaded] Change table header output’ is closed to new replies.