Since version: v1.0.0
Stub column
A stub column is the first column of a table. Its cells label the rows, the same way the table header labels the columns. Typical examples are product names in a comparison table or the days in a timetable.
Turn on the stub column
- Click the Settings for the table button.
- Open the Stub Column tab.
- Set Use First Table Column as a Stub Column to On.
In the editor, the cells of the first column get a light grey background, so you can tell them apart from the other cells.
Output on the website
When the table is output with get_table() or the shortcode, the first cell of each body and footer row is a th element instead of a td element. Browsers and screen readers then know that this cell is the header of its row.
The stub column does not add any styles to the table on your website. Style the th elements in the table body with your theme's CSS.
Related settings
- Keep the stub column in place: disable moving for the first column, so other columns can't be moved in front of it.
- Hide tables without row labels: the table output settings can hide a table when its stub column cells are empty.
- Hide the option from editors: in the field settings, uncheck Stub Column under Settings for the table. See Setup editing options.