Learn how to use TablePress

Documentation

Explore the TablePress functions, options, parameters, and advanced usage. For a general overview, see the Plugin Info page and check the Frequently Asked Questions.

The “TablePress table” editor block

When editing posts or pages, use the “TablePress table” block in the WordPress block editor to insert TablePress tables that you have created or imported.

You will be shown a dropdown to select the desired table, as well as an “Advanced” section with a field for “Configuration parameters”. You can find a screenshot below. Several TablePress premium features modules will also add dedicated configuration sections to the block’s Settings sidebar.

The Shortcode [table id=N /]

The Shortcode

[table id=N /]Code language: plaintext (plaintext)

can be used to display a table in a post, on a page, or in a text widget, in cases where using the “TablePress table” block is not possible or desired. While editing the content into which a table shall be embedded, the Shortcode serves as a placeholder for that table.

The Shortcode accepts different parameters which customize and configure the table that will be printed in the place of the Shortcode. Shortcode parameters follow the syntax name=value and can be added in arbitrary order, like

[table id=1 alternating_row_colors=false table_head=0 /]Code language: plaintext (plaintext)

The id parameter is required, as it defines which table is to be shown. All other parameters are optional. If a parameter is added, it overwrites the corresponding Table Option from the “Edit” screen of that table. For most use cases, it is recommended to change the setting in question by using the corresponding checkbox on the “Edit” screen of the table.

All available Shortcode parameters are documented in the Configuration parameter reference.

Configuration parameter reference

All versions of TablePress support the following basic configuration parameters, both in the “TablePress Table” block in the editor as well as when using the [table id=N /] Shortcode. The supported configuration parameters of the TablePress premium feature modules are shown below.

ModuleSlugConfiguration parameterNameDescriptionTypeDefault value
FreebasicidTable IDThe ID of the table to show (can be seen on the “All Tables” or the “Edit” screen).stringnone (required)
Freebasicalternating_row_colorsAlternating Row ColorsWhether the table shall get alternating row background or text colors (“zebra striping”).boolean (true or false)true
Freebasicrow_hoverRow Hover HighlightingWhether table rows shall be highlighted with a different background or text color, if the mouse hovers over them.boolean (true or false)true
Freebasictable_headTable HeaderHow many first rows shall be the table header. This value needs to be greater than 0 if any “Table Features for Site Visitors” shall be used.integer1
Freebasictable_footTable FooterHow many last rows shall be the table footer.integer0
Freebasicfirst_column_thFirst Column Table HeadWhether the cells in first column shall be marked as headers (HTML <th> tag) for their row.boolean (true or false)false
Freebasicprint_namePrint Table NameWhether the name of the table shall be printed above or below the table.boolean (true or false)false
Freebasicprint_name_positionTable Name PositionPosition for printing the table name.enum (above or below)above
Freebasicprint_descriptionPrint Table DescriptionWhether the description of the table shall be printed above or below the table.boolean (true or false)false
Freebasicprint_description_positionTable Description PositionPosition for printing the table description.enum (above or below)below
Freebasicextra_css_classesExtra CSS ClassesAllows adding additional CSS classes to the HTML <table> element, e.g. for styling of groups of tables.string"" (empty string)