• Resolved kinderzeitorg

    (@kinderzeitorg)


    Hi! I installed the Table Caption HTML tag extension for TablePress. Unfortunately, it seems there is no way to activate/deactivate the caption per table. It is always on now.

    But we have hundreds of tables and for most of them the table title (which is used for the caption tag) is not properly formulated yet. We rather used them for internal purposes so far.

    So, my question: Is it possible to deactivate the showing of the Caption as per default and only activate it through a variable in the [table] shortcode? i.e. caption=”on”??

    Thanks for any help!

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Hhm, good point. Unfortunately, the code currently does not allow controlling this via a Shortcode parameter 🙁 I’ll look into how I can maybe make that possible.

    However, I might have a workaround: As the caption get’s an extra CSS class that contains the table ID, you could hide the caption for all tables that should not yet have it, by adding this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-table-caption-id-2,
    .tablepress-table-caption-id-4,
    .tablepress-table-caption-id-5 {
      display: none;
    }

    This example would hide it for tables 2, 4, and 5. Just adjust/extend that list in the code as needed.

    Regards,
    Tobias

    Thread Starter kinderzeitorg

    (@kinderzeitorg)

    Thanks a lot, Tobias, for the quick reply.

    Yes, I understand, using CSS could be an option, but I don’t think it is necessarily a “clean” solution – also from an SEO perspective.

    In case you would find another option that would be incorporated into the PHP code of the extension that would be much appreciated!

    A thousand thanks for your great support and plugins!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, it’s not an ideal solution, which is why I called it “workaround” 😉

    I could imagine a PHP-based approach based on setting an “Extra CSS class”, but would first have to look into this some more. Also, as that would require a bit of custom development and modifications to the Table Caption HTML tag Extension, I’m not able to offer this as part of the free support right now. Thanks for your understanding.

    Best wishes,
    Tobias

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

The topic ‘Table Caption HTML tag –> Activate in Shortcode’ is closed to new replies.