Documentation

This page documents the functions, options, parameters, and advanced usage of TablePress. For general information about the plugin, please see the Plugin Info page. If you need help, please check the Frequently Asked Questions page as well.

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: JSON / JSON with Comments (json)

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: JSON / JSON with Comments (json)

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 Classesstring"" (empty string)
Freebasicuse_datatablesEnable Table Features for Site VisitorsWhether the “Table Features for Site Visitors” shall be used with this table. This requires that the table has at least one “Table Header” row.boolean (true or false)true
Freebasicdatatables_custom_commandsCustom Commandsstring"" (empty string)
Freebasicdatatables_datetimeDate and Time Detection Formatsstring"" (empty string)
Freebasicdatatables_filterSearch/Filteringboolean (true or false)true
Freebasicdatatables_infoTable Infoboolean (true or false)true
Freebasicdatatables_lengthchangePagiation Length Changeboolean (true or false)true
Freebasicdatatables_localeVisitor Features Localestringcurrent site locale
Freebasicdatatables_paginatePaginationboolean (true or false)true
Freebasicdatatables_paginate_entriesPagination Rows to showinteger10
Freebasicdatatables_scrollxHorizontal Scrollingboolean (true or false)false
Freebasicdatatables_scrollyVertical Scrollingboolean false or stringfalse
Freebasicdatatables_sortSortingboolean (true or false)true
Freebasichide_columnsHide ColumnsAllows overwriting the column visibility settings.
hide_columns=2,5-8 will hide columns 2, 5, 6, 7, and 8, regardless of their visibility configuration on the “Edit” screen.
The parameter hide_columns=all will hide all columns at once.
show_columns takes precedence over hide_columns.
string"" (empty string)
Freebasichide_rowsHide RowsAllows overwriting the row visibility settings.
hide_rows=2,5-8 will hide rows 2, 5, 6, 7, and 8, regardless of their visibility configuration on the “Edit” screen.
The parameter hide_rows=all will hide all rows at once.
show_rows takes precedence over hide_rows.
string"" (empty string)
Freebasicshow_columnsShow ColumnsAllows overwriting the column visibility settings.
show_columns=2,5-8 will show columns 2, 5, 6, 7, and 8, regardless of their visibility configuration on the “Edit” screen.
The parameter show_columns=all will show all columns at once.
show_columns takes precedence over hide_columns.
string"" (empty string)
Freebasicshow_rowsShow RowsAllows overwriting the row visibility settings.
show_rows=2,5-8 will show rows 2, 5, 6, 7, and 8, regardless of their visibility configuration on the “Edit” screen.
The parameter show_rows=all will show all rows at once.
show_rows takes precedence over hide_rows.
string"" (empty string)
Freebasiccache_table_outputCache Table OutputWhether the generated table output HTML code should be cached for one day. This should be turned off for tables that have dynamic content in their cells, like other Shortcodes.boolean (true or false)true
Freebasicconvert_line_breaksConvert Line BreaksWhether line breaks in the content in the table cells should be converted to HTML <br> tags, which resemble line breaks in HTML code.boolean (true or false)true
Freebasicevaluate_formulasEvaluate FormulasWhether formulas in this table should be evaluated before the table is rendered.boolean (true or false)true
Freebasicshortcode_debugShortcode DebuggingPrints the current render configuration below the table, for debugging purposes.boolean (true or false)false
FreebasicborderBorderDeprecated and no longer recommended. Use CSS code instead.
This corresponds to the <table border="0"> attribute that is no longer part of the HTML5 spec.
boolean (true or false)false
FreebasiccellpaddingCell PaddingDeprecated and no longer recommended. Use CSS code instead.
This corresponds to the <table cellpadding="0"> attribute that is no longer part of the HTML5 spec.
boolean (true or false)false
FreebasiccellspacingCell SpacingDeprecated and no longer recommended. Use CSS code instead.
This corresponds to the <table cellspacing="0"> attribute that is no longer part of the HTML5 spec.
boolean (true or false)false
Freebasiccolumn_widthsColumn WidthsDeprecated and no longer recommended. Use CSS code instead.
A string with width value (in pixels or as a percentage) for each column, separated by the | (pipe) symbol.
Examples:
column_widths=40px|50px|30px|60px
column_widths=20%|60%|20%
string"" (empty string)
Freebasicblock_previewBlock PreviewThis is an internal setting that should not be used.boolean (true or false)false

In addition, the different features modules in the TablePress premium versions support these configuration parameters:

ModuleSlugConfiguration parameterNameDescriptionTypeDefault value
Advanced Loadingdatatables-advanced-loadingdatatables_advanced_loadingboolean (true or false)false
Advanced Loadingdatatables-advanced-loadingdatatables_advanced_loading_html_rowsinteger10
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_firstlastboolean (true or false)false
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_previousnextboolean (true or false)true
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_numbersboolean (true or false)true
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_inputboolean (true or false)false
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_input_pageofboolean (true or false)true
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_buttonsinteger7
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_boundarynumbersboolean (true or false)true
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_scrolltotopboolean (true or false)false
Advanced Pagination Settingsdatatables-paginationdatatables_pagination_scrolltotop_offsetinteger10
Alphabet Searchdatatables-alphabetsearchdatatables_alphabetsearchboolean (true or false)false
Alphabet Searchdatatables-alphabetsearchdatatables_alphabetsearch_columnstring1
Alphabet Searchdatatables-alphabetsearchdatatables_alphabetsearch_alphabetenum (latin or greek)latin
Alphabet Searchdatatables-alphabetsearchdatatables_alphabetsearch_numbersboolean (true or false)false
Alphabet Searchdatatables-alphabetsearchdatatables_alphabetsearch_lettersboolean (true or false)true
Alphabet Searchdatatables-alphabetsearchdatatables_alphabetsearch_case_sensitiveboolean (true or false)false
Automatic Filterdatatables-auto-filterdatatables_auto_filterstring"" (empty string)
Automatic Filterdatatables-auto-filterdatatables_auto_filter_url_parameterstring"" (empty string)
Buttonsdatatables-buttonsdatatables_buttonsstring"" (empty string)
Cell Highlightingcell-highlightinghighlightCell Highlight termCells that contain this term will be highlighted. You can combine multiple highlight terms with an OR operator, e.g. term1||term2 or term1&&term2.string"" (empty string)
Cell Highlightingcell-highlightinghighlight_full_cell_matchFull cell matchingIf this is true, the full cell content has to match the highlight term.boolean (true or false)false
Cell Highlightingcell-highlightinghighlight_case_sensitiveCase-sensitive matchingIf this is true, the case sensitivity of the highlight term has to match the content in the cell.boolean (true or false)false
Cell Highlightingcell-highlightinghighlight_columnsHighlight columnsA comma-separated list of the columns which should be searched for the highlight terms, e.g. 1,3-5,7. By default, all columns will be searched.string"" (empty string) // "" equates to 'all'.
Cell Highlightingcell-highlightinghighlight_url_parameterCell Highlight URL parameterThis allows providing the Cell Highlight term in a URL parameter.string"" (empty string)
Column Filter Dropdownsdatatables-columnfilterwidgetsdatatables_columnfilterwidgetsboolean (true or false)false
Column Filter Dropdownsdatatables-columnfilterwidgetsdatatables_columnfilterwidgets_columnsstring"" (empty string)
Column Filter Dropdownsdatatables-columnfilterwidgetsdatatables_columnfilterwidgets_exclude_columnsstring"" (empty string)
Column Filter Dropdownsdatatables-columnfilterwidgetsdatatables_columnfilterwidgets_separatorstring"" (empty string)
Column Filter Dropdownsdatatables-columnfilterwidgetsdatatables_columnfilterwidgets_max_selectionsstring"" (empty string)
Column Filter Dropdownsdatatables-columnfilterwidgetsdatatables_columnfilterwidgets_group_termsboolean (true or false)false
Column Ordercolumn-ordercolumn_orderenum (default, reverse, or manual)default
Column Ordercolumn-ordercolumn_order_manual_orderstring"" (empty string)
Custom Search Builderdatatables-searchbuilderdatatables_searchbuilderboolean (true or false)false
Fixed Columnsdatatables-fixedheader-fixedcolumnsdatatables_fixedcolumnsstring"" (empty string)
Fixed Columnsdatatables-fixedheader-fixedcolumnsdatatables_fixedcolumns_left_columnsinteger0
Fixed Columnsdatatables-fixedheader-fixedcolumnsdatatables_fixedcolumns_right_columnsinteger0
Fixed Columnsdatatables-fixedheader-fixedcolumnsdatatables_scrollx_buttonsboolean (true or false)false
Fixed Rowsdatatables-fixedheader-fixedcolumnsdatatables_fixedheaderstring"" (empty string)
Fixed Rowsdatatables-fixedheader-fixedcolumnsdatatables_fixedheader_offsettopinteger0
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearchboolean (true or false)false
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearch_thresholdfloat0.5
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearch_togglesmartboolean (true or false)true
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearch_rankcolumnstring"" (empty string)
Index Columndatatables-counter-columndatatables_counter_columnboolean (true or false)false
Individual Column Filteringdatatables-column-filterdatatables_column_filterstring"" (empty string)
Individual Column Filteringdatatables-column-filterdatatables_column_filter_positionenum (table_head or table_foot)table_head
Individual Column Filteringdatatables-column-filterdatatables_column_filter_columnsstring"" (empty string)
Inverted Filteringdatatables-inverted-filterdatatables_inverted_filterboolean (true or false)false
Responsive Tablesresponsive-tablesresponsivestring"" (empty string)
Responsive Tablesresponsive-tablesresponsive_breakpointenum (phone, tablet, desktop, or all)phone
Responsive Tablesresponsive-tablesresponsive_scroll_buttonsboolean (true or false)false
Row Filteringrow-filteringfilterstring"" (empty string)
Row Filteringrow-filteringfilter_full_cell_matchboolean (true or false)false
Row Filteringrow-filteringfilter_case_sensitiveboolean (true or false)false
Row Filteringrow-filteringfilter_columnsstring"" (empty string) // "" equates to 'all'.
Row Filteringrow-filteringfilter_inverseboolean (true or false)false
Row Filteringrow-filteringfilter_url_parameterstring"" (empty string)
Row Groupingdatatables-rowgroupdatatables_rowgroupboolean (true or false)false
Row Groupingdatatables-rowgroupdatatables_rowgroup_datasrcstring1
Row Highlightingrow-highlightingrow_highlightstring"" (empty string)
Row Highlightingrow-highlightingrow_highlight_full_cell_matchboolean (true or false)true
Row Highlightingrow-highlightingrow_highlight_case_sensitiveboolean (true or false)false
Row Highlightingrow-highlightingrow_highlight_columns // "" equates to 'all'.string"" (empty string)
Row Highlightingrow-highlightingrow_highlight_rows // "" equates to 'all'.string"" (empty string)
Row Highlightingrow-highlightingrow_highlight_url_parameterstring"" (empty string)
Row Orderrow-orderrow_orderenum (default, reverse, sort, or manual)default
Row Orderrow-orderrow_order_sort_columnstring"" (empty string)
Row Orderrow-orderrow_order_sort_directionenum (asc or desc)asc
Row Orderrow-orderrow_order_manual_orderstring"" (empty string)
Search Highlightingdatatables-searchhighlightdatatables_searchhighlightboolean (true or false)false
Search Panesdatatables-searchpanesdatatables_searchpanesboolean (true or false)false
Search Panesdatatables-searchpanesdatatables_searchpanes_columnsstring"" (empty string)
Server-side Processingdatatables-serverside-processingdatatables_serverside_processingboolean (true or false)false
Server-side Processingdatatables-serverside-processingdatatables_serverside_processing_cached_pagesinteger0
Server-side Processingdatatables-serverside-processingdatatables_serverside_processing_periodic_refreshinteger0
Server-side Processingdatatables-serverside-processingdatatables_serverside_processing_request_typeenum (GET or POST)GET
Server-side Processingdatatables-serverside-processingdatatables_serverside_processing_html_rowsThis is only a Shortcode parameter, but not part of the user interface. By default, the value of the datatables_paginate_entries value is used.string"" (empty string)
Table Layoutdatatables-layoutdatatables_layoutTable LayoutThis parameter allows changing the Table Layout, by returning an object in JSON notation, e.g. as datatables_layout='{...}'.
However, as Shortcode parameters can not contain [ or ] characters that denote arrays in JSON, setting a different layout is only possible if only one control element should be shown per feature position.
Due to the JSON requirement, the JSON object string must be wrapped in single quotes ' for WordPress to properly recognize the parameter.
Example: The configuration parameter datatables_layout='{"top":"search", "topStart":null, "topEnd":null, "bottomStart":"paging", "bottomEnd":null}' will move the "Search" field to the top center position and only keep the Pagination controls below the table.
For more details, see the DataTables documentation.
string"" (empty string)
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.

Template Tag Functions

To show a table in places not covered by blocks or Shortcodes, e.g. in your page footer or in the sidebar, you can use the Template Tag Function tablepress_print_table( $query );. It can be added to any part of your theme (between PHP brackets: <?php and ?>).

The parameter $query can be a string in the form of a query string in a URL or it can be a an array with the query parameters and values.

If you don’t want to immediately print the table, but just get the output, use tablepress_get_table( $query );, which works the same way.

Example with $query as a string:

<?php tablepress_print_table( 'id=1&use_datatables=true&print_name=false' ); ?>Code language: PHP (php)

Example with $query as an array (recommended and easier to read):

<?php tablepress_print_table( array(
  'id' => '1',
  'use_datatables' => true,
  'print_name' => false,
) ); ?>Code language: HTML, XML (xml)

There’s a also a Template Tag Function for the Shortcode

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

available:

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

or

<?php tablepress_print_table_info( array(
  'id' => '1',
  'field' => 'name',
) ); ?>Code language: PHP (php)

It works exactly as the Template Tag Function described above, with the parameters from the section about the [table-info /] Shortcode.

Table Options

Each table has individual options that only concern that table. They can be changed on the table’s “Edit” screen. All of them may be overwritten by the corresponding configuration parameter of the “TablePress table” block in the block editor.

The following options are available:

Alternating row colors
If enabled, odd and even rows will get different background and text colors. (There’s an example on how to change these colors in the FAQ.)
Row Highlighting
If enabled, the background color of all cells of the row that is currently hovered with the mouse cursor is changed to highlight the row. (There’s an example on how to change the color in the FAQ.)
Table Head Row
If this is activated, all cells in the first displayed row will be encapsuled by the <th> instead of the <td> HTML tag and the row will be put inside a <thead> HTML tag. This is mandatory for using any of the “Table Features for Site Visitors”!
Table Foot Row
If this is activated, all cells in the last displayed row will be encapsuled by the <th> instead of the <td> HTML tag and the row will be put inside a <tfoot> HTML tag.
Table Name
If enabled, the Name of the Table will be printed above/below the table inside a <h2> HTML tag, which has the CSS class tablepress-table-name. The position can be selected from “above” or “below”.
Table Description
If activated, the Description of the Table will be printed above/below the table inside a <span> HTML tag, which has the CSS class tablepress-table-description. The position can be selected from “above” or “below”.
Plugin Options

The plugin has the following general “Plugin Options”. They affect the global plugin behavior in different areas.

Custom CSS

If you want to change the style of tables, you can enter those additional commands into the “Custom CSS” textarea. There are examples on how to change certain style aspects on the FAQ page.

Admin menu entry

Use this setting to move the menu entry “TablePress” (by default in the middle of the menu) to another place in the admin menu of the Dashboard of your site.

CSS selectors, Styling

Every table gets certain CSS classes and an HTML ID that can be used for styling. Add your styling commands to the “Custom CSS” textarea on the “Plugin Options” screen.

There are examples for common styling tasks on the FAQ page.

CSS classes are attached as <element class="class-name">...</element> to an <element>, IDs are attached as <element id="html-id">...</element>.

CSS classes

.class {
	/* your CSS */ 
}Code language: CSS (css)
tablepress (class of <table>)
Every table has this class.
tablepress-id-<ID> (class of <table>)
Every table has this class (with its ID for <ID>).
row-<number> (class of <tr>)
Every row gets this. <number> is the number of the row displayed, no matter if it is a heading row or data row. Counting always starts at 1.
column-<number> (class of every <th> or <td>)
<number> is the number of the column the cell belongs to. It will be a class of every <th> and <td> element.
Use this for styling column widths!
Example:
.tablepress .column-2 { 
	width: 200px; 
}

There’s another example in the FAQ. Important: If you use both the .column-X and the .row-X selectors at the same time, the .row-X has to stand before the .column-X (because it is given to the <tr> which encloses the <td>).

odd and even (classes of every <tr>)
If the Table Option “Alternating row colors” (or the Shortcode parameter) is enabled, every row will get one of these classes, depending on whether it is an odd or even row. Use the classes to actually style the alternating background colors. There’s an example to do this in the FAQ
tablepress-table-name (classes of <h2>)
If the Table Option “Print Table Name” is enabled, the Name of the Table will be printed above or below the table inside a <h2> HTML tag, which has this class.
tablepress-table-description (classes of <span>)
If the Table Option “Print Table Description” is enabled, the Description of the Table will be printed above or below the table inside a <span> HTML tag, which has this class.

CSS/HTML IDs

#html-id {
	/* your CSS */ 
}Code language: CSS (css)
tablepress-<ID>-no-<number> (ID of <table>)
Every table gets an ID like this. <ID> stands for the ID used in the “All Tables” list of TablePress. <number> is the count/occurrence of that table on the page up to this point. (For example, if you display the same table (with the same <ID>) twice on your site (e.g. once in a post and the second time in the sidebar), the first one will have no -no-... and the second one will have <number> = 2. This means, that these HTML IDs are not very reliable to be used for styling, as they might change depending on the occurrence of the same table on the page again. These IDs are used to invoke the JavaScript library’s calls (if activated for this occurrence of the table).
Table Features for Site Visitors

TablePress can add features like sorting, pagination (with length change feature), scrolling, and filtering/searching to a table. To enable those, check the corresponding checkboxes on the table’s “Edit” screen.

Even more features for your site’s visitors are available in the Premium features that come with a TablePress Premium plan.

You may decide for each table individually whether you want to use the “Table Features for Site Visitors” for it (see the Table Options page for more), and you can select the desired features individually.

You can add custom commands or configuration parameters into the “Custom Commands” text field. These need to follow the DataTables Documentation. You can also use certain Plugin Hooks in a custom plugin to add your own commands.

Import and Export Formats

TablePress understands a variety of common spreadsheet formats and can use them for importing and exporting tables. In addition, TablePress supports multiple import sources and can either add new tables from imported files or replace or append to existing tables.

Import Formats

The major import formats that TablePress automatically recognizes are described below. In addition, less common formats like ODS (OpenDocument Spreadsheet), Gnumeric, and SYLK are supported. Files from Apple Numbers are not supported at this time, so that it is recommended to save such a file to one of the supported formats before trying to import them.

CSV (Character-separated Values)

Every row is in a new line, every column is separated by a character (like “;” (semicolon), “,” (comma), or “\tab” (tabulator)). The plugin will try to determine the used separation character automatically. See the Wikipedia article for more information on the CSV format.

XLS/XLSX (Microsoft Excel)

TablePress also supports Microsoft Excel data formats for import (but not export!) of table data. Note that this support is not complete, and not all data features, like data types, are supported or available. Also, TablePress can only import the first worksheet of the Excel file. If you have problems importing tables from XLS or XLSX files, it’s recommend to save these tables in Excel as CSV files and try importing those.

HTML (Hypertext Markup Language)

The plugin will import the first occurrence of an HTML table (enclosed in <table></table>) from an HTML file. It is not possible to import multiple tables from the same file or URL, but only the first one.

JSON (JavaScript Object Notation)

TablePress can import tables from JSON that represents a plain two-dimensional array of strings, where each string represents the content of a cell. It can also import its custom and more advanced JSON format, as created during the export. See the Wikipedia article for more information on the JSON format.

Export Formats

From the Import Formats that are described above, these are available as the target format for an exported table:

  • CSV (Character-separated Values)
  • HTML (Hypertext Markup Language)
  • JSON (JavaScript Object Notation)

If multiple tables are exported at the same time, these will be stored in a ZIP archive.

Import Sources

TablePress can import files from four different sources, which can be selected on its “Import” screen:

  • File Upload, by selecting or dragging and dropping files from your local computer
  • URL (link address) of a file on a website
  • Server (path of a file stored on the site’s server)
  • Manual Input

The File Upload, URL, and Server import sources also support working with ZIP archives that contain multiple supported files. In addition, the File Upload import source allows to directly upload multiple files, even in different supported formats.

It is also possible to import tables form common online services like Google Sheets, Google Drive, Microsoft Excel Online, Microsoft OneDrive, and Dropbox. Beginner-friendly step-by-step tutorials are available to guide you through the process of finding the necessary URL for that.

These manual imports are one-time imports. Using the Automatic Periodic Table Import feature module of the TablePress Max premium license plan, it’s possible to fully automate the import of a table file. This saves time and allows updating tables without having to log into your WordPress site!

Access capabilities and user permissions

Access permissions in WordPress are based around Roles and Capabilities.

TablePress also fully supports and uses this system, by performing relevant permission checks before executing desired user actions. For this, it also uses custom access capabilities that are documented below. These can be used to control which user roles can do what in TablePress.

Access capabilities assigned by TablePress

The user roles “Author”, “Editor”, and “Administrator” get the access capabilities

  • tablepress_edit_tables
  • tablepress_delete_tables
  • tablepress_list_tables
  • tablepress_add_tables
  • tablepress_copy_tables
  • tablepress_import_tables
  • tablepress_export_tables
  • tablepress_access_options_screen
  • tablepress_access_about_screen

Furthermore, the “Administrator” and “Editor” roles get the

  • tablepress_import_tables_url

capability. In addition, “Administrators” also get the capability

  • tablepress_edit_options.

Modifying and using access capabilities

The Members and the User Role Editor plugin are popular choices to assign capabilities to existing or custom user roles. They both allow adding or removing these permissions to and from user roles.

Plugin Hooks, Actions, and Filters

TablePress has a large number of WordPress Plugin Hooks (Actions and Filters) in its source code. These provide easy and well established methods to add new features and enhancements to the plugin, or to alter plugin behavior. A more detailed explanation can be found in the WordPress Developer Handbook.

There are some examples on how to use these hooks on the Extensions page.

The advantage of using these hooks in contrast to modifying the plugin’s source files is that the changes will still work after upgrading the plugin, and that they can be maintained separately.

Source Code

The source code of TablePress Free is available in the ZIP file that can be downloaded from the plugin’s page in the WordPress Plugin Repository. It is Open Source and licensed as Free Software under GNU General Public License 2 (GNU GPL 2).

Development takes place in a git repository on GitHub.