Requires Nitida Tables Pro.
Your site may already have tables made with the WordPress Table block. On phones, wide tables squeeze their columns until words break letter by letter. Nitida Tables Pro can show those tables as cards on small screens without changing your posts, and can convert them to full Nitida tables when you want more.
Open Nitida Tables > WordPress tables (administrators only).
Cards on phones
Turn on Make WordPress tables readable on phones. Nothing in your content is changed. Tables are marked while the page is rendered, and the desktop layout stays as WordPress draws it. When the option is off, every table block looks as WordPress draws it.
Wide tables become cards on small screens: every row is a card, and every value shows its column name. The header is found like this: the last row of the table head, or, without a head, the first row when it looks like a header (all header cells, all bold, or short labels without numbers).
Tables with merged cells, or without a header row, scroll sideways on phones instead of becoming cards. That avoids cards with wrong labels.
Which tables, which screens
Under Which tables, which screens:
- Tables with at least N columns become cards. The default is 5. Narrow tables read well as they are. The page shows how many of your table blocks have each column count.
- On screens up to sets the phone width: Small phones (480 px), Phones (640 px) (the default), Large phones (768 px), Tablets too (1024 px) or a custom value.
Cards and visitor tools
Under Cards and visitor tools:
- Show the first column as the card title: product, version or name on top, in bold.
- Let visitors sort by any column: a click on a header on desktop, and a Sort by menu on phones. The original order is one of the choices.
- Add a search box to long tables, from a number of rows that you choose (8 by default).
A Phone preview beside the form shows a table from your own site, using its first two rows. Press Save settings to apply the changes. Page caches are cleared so visitors see the change.
The overview
The top of the screen counts the table blocks in your published posts and pages:
- Table blocks: the total.
- Cards on phones: how many become cards, and in how many posts.
- Scroll sideways on phones: wide tables without a header row or with merged cells.
- Left as they are: tables with fewer columns than your limit.
- Nitida tables: tables made with Nitida Tables, and where they are shown.
The list Wide tables on your site names the posts and pages with wide tables, shows whether each becomes Cards or Scroll, and has a View link. Open one on your phone to see the cards. Show all reveals the full list.
Dashboard widget
Administrators also get a Nitida Tables: tables on your site widget on the WordPress dashboard. It shows the same numbers with links to the WordPress tables settings and to All tables.
Convert to Nitida tables
If you want more than cards, convert the blocks. A converted table gets revisions, the spreadsheet editor, data sources and every Pro feature, and it can be reused in other posts. The post keeps its place, URL and publish date. The Table block is replaced by the Nitida Table block.
On the same screen, open Convert to Nitida tables:
- Choose Which tables: Wide tables (at least your column limit) or All table blocks.
- Tick the posts, or use Select all.
- Press Convert selected posts.
Each converted table is named after the post and its position, such as “My post, table 1”. It gets the table caption as its description and keeps the header row setting of the original. Up to 20 posts are converted per run. Press the button again for the rest. Tables already converted are not touched again. Tables in classic editor content are left as they are.
Convert one post first and check it before you convert the rest.
Undo
The original block HTML is kept for every converted post. Under Converted posts, press Undo next to a post to put the original tables back. WordPress also keeps a normal revision of the post. Undo also removes the Nitida tables that were created from the post, unless another post shows them.