• Resolved AlexPR

    (@alexpr)


    I would like to hide the table caption and table name in the output rendered in the browser. However, the table caption and name should be in the HTML output for SEO purposes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For that, you could hide these with CSS code. For example, add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-table-name,
    .tablepress caption {
      display: none;
    }

    Regards,
    Tobias

    Thread Starter AlexPR

    (@alexpr)

    Hi Tobias,
    this works perfectly. I changed your snippet to hide name, caption and description:

    .tablepress-table-name,
    .tablepress-table-description,
    .tablepress caption {
    	display: none;
    }

    I understand that I can set the name and description in the TablePress configuration for each table. But where can I set the caption?
    Thanks,
    Alex

    • This reply was modified 3 years, 10 months ago by AlexPR.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Alex,

    yes, this CSS code looks good!

    The caption can not be set from a text field at this time, but only programmatically. You could download, install, and activate the TablePress Extension from https://tablepress.org/extensions/table-caption-html-tag/ for this. After that, the table name will be used as the caption. You could also change that to the description, or a combination of name and description, by modifying the PHP code of the Extension.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide table caption and name in browser but keep in HTML’ is closed to new replies.