← Main site

Table [tbl_table]

The [tbl_table] shortcode renders a responsive comparison table with striped rows and a scrollable container for wide screens. It is designed for feature comparison, pricing tables, and specification lists.

Usage

[tbl_table
    headers="Feature,Free Plan,Pro Plan"
    rows="Storage,1 GB,50 GB,
          Users,1,Unlimited,
          Support,Email only,Priority 24/7,
          Custom domain,No,Yes"]

Parameters

ParameterRequiredDescription
headersYesComma-separated list of column header labels.
rowsYesComma-separated cell values. Rows are divided automatically by the number of columns in headers.
captionNoOptional table caption displayed above the table.

How rows work

The rows parameter is a flat, comma-separated list. The theme divides it into rows automatically based on the number of columns defined in headers. If you have 3 headers, every 3 values form one row.

For example, with headers="Name,Score" and rows="Alice,95,Bob,87,Carol,91", the output is:

NameScore
Alice95
Bob87
Carol91

Responsive behavior

On narrow screens, the table scrolls horizontally inside its container. The page layout is not affected. This ensures wide tables remain readable on mobile without breaking the layout.

⚠️

Commas inside cell values will break the column alignment since commas are used as delimiters. Avoid using commas in cell content, or use an alternative separator by editing the shortcode output in the child theme.