Forums

TablePress
[resolved] Force Table Name to h3 (4 posts)

  1. nick_the_greek
    Member
    Posted 4 months ago #

    Hi,
    I have read about changing the font of a table name by using

    .tablepress-table-name {
      font-size: 16px;
    }

    But I need to force the table name to use the h3 heading. Is this possible?

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,

    thanks for your post.

    Yes, changing this from an <h2> to an <h3> is possible, and only requires some small PHP code.
    Please try adding this to your theme's "functions.php".

    add_filter( 'tablepress_print_name_html_tag', 'tablepress_change_table_name_h2_to_h3', 10, 2 );
    function tablepress_change_table_name_h2_to_h3( $tag, $table_id ) {
      $tag = 'h3';
      return $tag;
    }

    Regards,
    Tobias

  3. nick_the_greek
    Member
    Posted 4 months ago #

    Worked great thanks so much!

  4. TobiasBg
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,

    sure, no problem! :-) Great to hear that this did it!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate the plugin here in the plugin directory. Thanks!

Reply

You must log in to post.

About this Plugin

About this Topic