{"id":412488,"date":"2026-11-25T02:26:21","date_gmt":"2026-11-25T02:26:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wst-data-tables\/"},"modified":"2026-11-25T02:25:50","modified_gmt":"2026-11-25T02:25:50","slug":"wst-data-tables","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wst-data-tables\/","author":23550007,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.5","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"WST Data Tables","header_author":"webtatsu","header_description":"Manage data in a spreadsheet-like editor and output it on your site with template functions or shortcodes.","last_updated":"2026-11-25 02:25:50","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":13,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"webtatsu","date":"2026-11-25 02:25:50","revision":3821891}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3821888,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3821888,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3821888,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3821888,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3821888,"resolution":"1","location":"assets","locale":"","width":1440,"height":824},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3821888,"resolution":"2","location":"assets","locale":"","width":1440,"height":824},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3821888,"resolution":"3","location":"assets","locale":"","width":1440,"height":824},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3821888,"resolution":"4","location":"assets","locale":"","width":1440,"height":824}},"screenshots":{"1":"The table editor","2":"The find and replace panel","3":"The right-click menu","4":"The table list"}},"plugin_section":[],"plugin_tags":[567,3524,153,9471,2289],"plugin_category":[59],"plugin_contributors":[277760],"plugin_business_model":[],"class_list":["post-412488","plugin","type-plugin","status-publish","hentry","plugin_tags-csv","plugin_tags-data","plugin_tags-database","plugin_tags-spreadsheet","plugin_tags-table","plugin_category-utilities-and-tools","plugin_contributors-webtatsu","plugin_committers-webtatsu"],"banners":{"banner":"https:\/\/ps.w.org\/wst-data-tables\/assets\/banner-772x250.png?rev=3821888","banner_2x":"https:\/\/ps.w.org\/wst-data-tables\/assets\/banner-1544x500.png?rev=3821888","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wst-data-tables\/assets\/icon-128x128.png?rev=3821888","icon_2x":"https:\/\/ps.w.org\/wst-data-tables\/assets\/icon-256x256.png?rev=3821888","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wst-data-tables\/assets\/screenshot-1.png?rev=3821888","caption":"The table editor"},{"src":"https:\/\/ps.w.org\/wst-data-tables\/assets\/screenshot-2.png?rev=3821888","caption":"The find and replace panel"},{"src":"https:\/\/ps.w.org\/wst-data-tables\/assets\/screenshot-3.png?rev=3821888","caption":"The right-click menu"},{"src":"https:\/\/ps.w.org\/wst-data-tables\/assets\/screenshot-4.png?rev=3821888","caption":"The table list"}],"raw_content":"<!--section=description-->\n<p>WST Data Tables lets you enter and manage data in a spreadsheet-like editor. It suits any data you keep in rows and columns: price lists, opening hours, schedules, staff lists, store locations, and more.<\/p>\n\n<p>Data is stored in its own database tables, separate from posts and pages. The idea is that a developer designs the table and builds it into the theme, and the people who run the site update the cell values.<\/p>\n\n<h4>Use it in templates<\/h4>\n\n<p>Get the data as an array in your theme's PHP and build the HTML. This example uses a table with the table key <code>plans<\/code> and the column keys <code>name<\/code> and <code>price<\/code>.<\/p>\n\n<pre><code>&lt;?php $rows = wst_data_tables_get_data( 'plans', 'key' ); ?&gt;\n&lt;dl&gt;\n  &lt;?php foreach ( $rows as $row ) : ?&gt;\n    &lt;dt&gt;&lt;?php echo esc_html( $row['name'] ?? '' ); ?&gt;&lt;\/dt&gt;\n    &lt;dd&gt;&lt;?php echo esc_html( $row['price'] ?? '' ); ?&gt;&lt;\/dd&gt;\n  &lt;?php endforeach; ?&gt;\n&lt;\/dl&gt;\n<\/code><\/pre>\n\n<p>Values are not escaped. Use <code>esc_html()<\/code> or similar when you output them.<\/p>\n\n<h4>Use it with a shortcode<\/h4>\n\n<p>To use it without touching the theme, paste a shortcode into a Shortcode block in a post or page.<\/p>\n\n<pre><code>[wst_data_tables table=\"plans\" show_labels=\"true\"]\n<\/code><\/pre>\n\n<p>A single cell is output without a table wrapper. Line breaks become <code>&lt;br&gt;<\/code> tags. You can place it inside a sentence, such as <code>The Standard plan is $[wst_data_tables table=\"plans\" row=\"standard\" column=\"price\"] a month.<\/code> A value shown on many pages is then updated in one place.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Copy and paste from Excel or Google Sheets<\/li>\n<li>Right-click to add or delete rows and columns, duplicate rows, and set column types (text, number, date)<\/li>\n<li>Find and replace, and go to a row number or column letter<\/li>\n<li>Column widths, row heights, and freezing 0 to 3 columns on the left<\/li>\n<li>Right-click to copy the code (PHP or shortcode) for a cell, row, or column<\/li>\n<li>Undo and redo, and Ctrl\/Cmd+S to save<\/li>\n<li>CSV import and export, optional row keys, and updates matched by row key (Shift_JIS files can be read too)<\/li>\n<li>JSON export and import to move a table to another site<\/li>\n<li>Public or private visibility per table, and locks that prevent changes to the column and row structure<\/li>\n<li>Prompts for conflicting saves, reverting to the previous save, and Trash<\/li>\n<\/ul>\n\n<h4>Functions<\/h4>\n\n<ul>\n<li><code>wst_data_tables_get_data( $table, $key_style, $args )<\/code> returns an array of all rows<\/li>\n<li><code>wst_data_tables_get_row( $table, $row, $key_style )<\/code> returns one row<\/li>\n<li><code>wst_data_tables_get_column( $table, $column )<\/code> returns one column's values from top to bottom<\/li>\n<li><code>wst_data_tables_get_cell( $table, $cell )<\/code> \/ <code>wst_data_tables_get_cell( $table, $column, $row )<\/code> returns one cell's value<\/li>\n<li><code>wst_data_tables_get_labels( $table, $key_style )<\/code> returns the column labels<\/li>\n<li><code>wst_data_tables_get_columns( $table )<\/code> returns the label, key, and type of each column<\/li>\n<li><code>wst_data_tables_get_row_keys( $table )<\/code> returns the row keys in saved order<\/li>\n<li><code>wst_data_tables_get_info( $table )<\/code> returns the table's ID, key, and name<\/li>\n<li><p><code>wst_data_tables_get_list()<\/code> returns the list of public tables<\/p>\n\n<p>$table is a table key or table ID, <code>$row<\/code> is a row number (from 1) or row key, and <code>$column<\/code> is a column letter (A, B, C) or column key. Pass <code>key<\/code> as <code>$key_style<\/code> to use column keys as the array keys of each row.<\/p><\/li>\n<\/ul>\n\n<p>Missing or private tables return an empty array or <code>null<\/code>.<\/p>\n\n<h4>Filtering and sorting<\/h4>\n\n<p>The third argument of <code>get_data()<\/code> filters (exact match, AND), sorts, and limits the rows. Sorting compares values by column type (text, number, date).<\/p>\n\n<pre><code>&lt;?php\n$rows = wst_data_tables_get_data( 'plans', 'key', array(\n  'where'   =&gt; array( 'category' =&gt; 'business' ),\n  'orderby' =&gt; 'price',\n  'order'   =&gt; 'asc',\n  'limit'   =&gt; 10,\n  'keyed'   =&gt; true,\n) );\n?&gt;\n<\/code><\/pre>\n\n<p>With <code>'keyed' =&gt; true<\/code>, row keys become the array keys of the rows. If row keys match post slugs, you can link from a list to detail pages.<\/p>\n\n<p>In shortcodes, write <code>where<\/code> as column:value. <code>&amp;&amp;<\/code> means all must match, and <code>||<\/code> means any matches.<\/p>\n\n<pre><code>[wst_data_tables table=\"plans\" where=\"category:business &amp;&amp; status:active\" orderby=\"price\" limit=\"10\"]\n[wst_data_tables table=\"plans\" where=\"category:business || category:personal\"]\n<\/code><\/pre>\n\n<h4>REST API (read-only)<\/h4>\n\n<p>Disabled by default. To use it, add the following code to your theme's functions.php or similar. There is no setting for it in the admin.<\/p>\n\n<pre><code>add_filter( 'wst_data_tables_rest_enabled', '__return_true' );\n<\/code><\/pre>\n\n<p>When enabled, anyone, even when logged out, can read public tables.<\/p>\n\n<pre><code>GET \/wp-json\/wst-data-tables\/v1\/tables\/plans?keys=key&amp;where[category]=business&amp;orderby=price&amp;limit=10\n<\/code><\/pre>\n\n<p>Writing is not possible. Private, trashed, and missing tables return 404.<\/p>\n\n<h4>Hooks for developers<\/h4>\n\n<ul>\n<li><code>wst_data_tables_changed<\/code> (action) runs after a table changes, with the table ID and the reason. Use it to clear page caches, for example.<\/li>\n<li><code>wst_data_tables_data<\/code> (filter) changes values before they are output on the site, for example to format numbers or dates in one place.<\/li>\n<li><code>wst_data_tables_capability<\/code> (filter) changes the capability needed to edit data.<\/li>\n<li><code>wst_data_tables_rest_enabled<\/code> (filter) enables the REST API when it returns <code>true<\/code>.<\/li>\n<\/ul>\n\n<h4>Permissions<\/h4>\n\n<ul>\n<li>Administrators can do everything.<\/li>\n<li>Data editors can edit cells, find and replace, export, and update existing rows from CSV by row key. Unless locked, they can also edit row keys, add, delete, and duplicate rows, and append rows from CSV.<\/li>\n<li>Choose which roles are data editors on the Settings screen (Editor by default).<\/li>\n<li>Only administrators can create, duplicate, and delete tables; change the table name, table key, and column settings; change visibility and locks; reorder the list; replace all rows from CSV; import JSON; and revert to the previous save.<\/li>\n<\/ul>\n\n<h4>Good to know<\/h4>\n\n<ul>\n<li>When the REST API is enabled, anyone can read every row and column of public tables, even if your pages show only some columns. Do not make a table public if it has columns that should stay private.<\/li>\n<li>Text values are preserved when saved. Valid numbers and dates may be normalized on save. Escape them with <code>esc_html()<\/code> or similar when you output them in templates. The plugin escapes shortcode output.<\/li>\n<li>Cell values are always returned as strings, whatever the column type.<\/li>\n<li>Shortcode tables have no styling. Style them with your theme's CSS.<\/li>\n<li>Each table can have up to 1,000 rows and 100 columns. There is no limit on the number of tables.<\/li>\n<li>The database must support the InnoDB engine.<\/li>\n<\/ul>\n\n<h4>Third-party libraries<\/h4>\n\n<p>The editor grid uses the following libraries, both under the MIT license.<\/p>\n\n<ul>\n<li>Jspreadsheet CE 4.13.4: https:\/\/github.com\/jspreadsheet\/ce<\/li>\n<li>jSuites 5.13.5: https:\/\/github.com\/jsuites\/jsuites<\/li>\n<\/ul>\n\n<p>The bundled <code>assets\/vendor\/jspreadsheet\/index.js<\/code> is the minified file published by its authors. The unminified source is available at the link above.<\/p>\n\n<p>This plugin does not connect to any external services.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/wst-data-tables<\/code>, or install it from Plugins &gt; Add New Plugin in WordPress.<\/li>\n<li>Activate the plugin on the Plugins screen.<\/li>\n<li>Create a table on the Tables screen under Data Tables in the admin menu.<\/li>\n<li>Enter data in the editor and click \"Save changes\".<\/li>\n<li>Open \"Code\" in the toolbar to see the code, and paste it into a theme template or a Shortcode block.<\/li>\n<\/ol>\n\n<p>For full instructions, see the Guide under Data Tables in the admin menu.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20is%20this%20different%20from%20acf%20or%20custom%20post%20types%3F\"><h3>How is this different from ACF or custom post types?<\/h3><\/dt>\n<dd><p>ACF adds fields to a single post, and a custom post type stores each item as a post. This plugin treats a whole table of rows and columns as one unit, so updating ten rows of a price list does not mean opening ten posts. Data is stored in its own tables, so it does not appear in post lists or search.<\/p><\/dd>\n<dt id=\"can%20i%20use%20it%20to%20make%20tables%20for%20my%20pages%3F\"><h3>Can I use it to make tables for my pages?<\/h3><\/dt>\n<dd><p>Yes. The shortcode outputs a <code>&lt;table&gt;<\/code>. However, there are no options for colors, borders, sort buttons, or pagination; style the table with your theme's CSS. If you want to design how tables look on screen, a plugin made mainly for building tables is a better fit.<\/p><\/dd>\n<dt id=\"i%20saved%2C%20but%20the%20page%20still%20shows%20old%20data\"><h3>I saved, but the page still shows old data<\/h3><\/dt>\n<dd><p>Check that the table is public. If it is, a page cache may still hold the old page. You can clear caches with the <code>wst_data_tables_changed<\/code> action.<\/p><\/dd>\n<dt id=\"how%20do%20i%20add%20thousands%20separators%20to%20numbers%2C%20or%20show%20dates%20in%20another%20format%3F\"><h3>How do I add thousands separators to numbers, or show dates in another format?<\/h3><\/dt>\n<dd><p>Format them in your template, or use the <code>wst_data_tables_data<\/code> filter. With the filter, the functions, the REST API, and shortcodes all output the same format.<\/p>\n\n<pre><code>add_filter( 'wst_data_tables_data', function ( $rows, $table ) {\n  if ( 'plans' !== $table['table_key'] ) {\n    return $rows;\n  }\n  foreach ( $rows as &amp;$row ) {\n    if ( isset( $row['price'] ) &amp;&amp; is_numeric( $row['price'] ) ) {\n      $row['price'] = number_format( (float) $row['price'] );\n    }\n  }\n  unset( $row );\n  return $rows;\n}, 10, 2 );\n<\/code><\/pre><\/dd>\n<dt id=\"i%20inserted%20a%20column%2C%20and%20my%20code%20now%20points%20to%20a%20different%20column\"><h3>I inserted a column, and my code now points to a different column<\/h3><\/dt>\n<dd><p>When columns are referred to as A, B, C, the letters after the inserted column shift. Give the column a key and use the key instead; keys point to the same column even when positions change. The editor asks first when inserting would shift references.<\/p><\/dd>\n<dt id=\"i%20don%27t%20want%20the%20people%20who%20update%20data%20to%20change%20the%20columns\"><h3>I don't want the people who update data to change the columns<\/h3><\/dt>\n<dd><p>Data editors cannot change the table key, column settings, or visibility. You can also lock row keys and prevent rows from being added or deleted using Settings in the editor.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20my%20data%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens to my data when I delete the plugin?<\/h3><\/dt>\n<dd><p>By default it is kept, and reinstalling the plugin brings it back. To delete the data too, check \"When the plugin is deleted, also delete all tables, backups, and settings on this site\" on the Settings screen, then delete the plugin. This cannot be undone. Deactivating alone does not delete anything.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20multisite%3F\"><h3>Does it work on multisite?<\/h3><\/dt>\n<dd><p>Yes. Tables and settings are separate for each site. Whether to delete data on uninstall is also set per site.<\/p><\/dd>\n<dt id=\"can%20csv%20keep%20row%20keys%20and%20update%20existing%20rows%3F\"><h3>Can CSV keep row keys and update existing rows?<\/h3><\/dt>\n<dd><p>Yes. Enable \"Include row keys in the first column\" when exporting and \"Use the first column as row keys\" when importing. \"Update by row key\" matches existing rows without changing their order, keys, or heights. Empty CSV cells clear existing values. Update rows without keys are skipped, even when they contain values; the number skipped is reported. Invalid, duplicate, or unknown update keys stop the import without changing data. Append and replace also accept row keys, including blank keys.<\/p>\n\n<p>Exports exclude column labels by default. Enable \"Include column labels in the first row\" if you need a header.<\/p>\n\n<p>\"First row is a header\" skips the first row; select it when reimporting only if the export included labels. Administrators can separately choose \"Use the header as column labels\" for append or replace when structure is unlocked. Updates keep column definitions unchanged. Imports only change the editor until you click \"Save changes\".<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Manage table data in a spreadsheet-like editor, then output it with theme template functions or shortcodes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/412488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=412488"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/webtatsu"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=412488"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=412488"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=412488"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=412488"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=412488"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=412488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}