Documentation
The Shortcode [table-info id=N /]

The Shortcode

[table-info id=N field=<field-name> /]Code language: JSON / JSON with Comments (json)

can be used to display table meta data in a post, page, or text widget. While editing the content into which the Shortcode is embedded, it serves as a placeholder for that meta information.

The Shortcode supports three parameters:

ModuleSlugConfiguration parameterNameDescriptionTypeDefault value
Table Infotable-infoidTable IDThe ID of the table to show (can be seen on the “All Tables” or the “Edit” screen).stringnone (required)
Table Infotable-infofieldMeta Field NameThe name of a meta field.
Possible values are
name: The name of the table with ID id.
description: The description of the table with ID id.
last_modified: The time of the last modification of the table with ID id.
last_editor: The author who last modified the table with ID id.
stringnone (required)
Table Infotable-infoformatMeta Field Output FormatOnly applies to the default field last_modified:
If the format parameter is set to raw, a date-time string will be returned, otherwise a pretty string. The format human can be used to show a text like “5 hours ago”, the format values date and time show just the date or time of the last modification, respectively.
string"" (empty string)

Examples for using this Shortcode

The table [table-info id=2 field=name /] was last modified at [table-info id=2 field=last_modified format=raw /] by [table-info id=2 field=last_editor /].Code language: HTML, XML (xml)

will produce something similar to

The table Demo Table was last modified at 2024-11-12 15:20:21 by TobiasBg.Code language: HTML, XML (xml)

There’s a also a Template Tag Function for this Shortcode available:

<?php tablepress_table_info( 'id=1&field=name' ); ?>Code language: PHP (php)

It works exactly like the Template Tag Function, with the parameters from this section.