TablePress and its associated extensions are the WordPress plugins we use to manage data about ESA. We store the data in TablePress tables accessible from the WordPress dashboard and then insert entire tables or parts of tables into posts using shortcodes.
The TablePress menu and options within WordPress are pretty self-explanatory, but if you run into problems or want to do something a bit complex, the FAQ or Documentation are very helpful.
Before editing a table, make a backup by exporting the table. If you accidentally mess things up, you can just import your backup table and replace the one you messed up.
Creating a table
Create a CSV table, import it [TablePress -> Import a Table (File Upload, Add as new table)], choose the appropriate options, and save it.
Editing a table
Go to the list of All Tables and choose the table you want to edit. If the table is large, it may take some time to load. Chrome is faster than Firefox. Once the table loads, edit and save. Rows may be added from this interface, but they can also be appended using the following method.
Appending many rows to a table
Create a CSV file with the same number and arrangement of columns as the table in TablePress. Do not include a header row. The file must be saved with both comma and quote delimiters, like “Text1”, “Text2”, “Text3”. Excel does not do this, so use LibreOffice or OpenOffice instead. Import the table [TablePress -> Import a Table (File Upload, Append rows to existing table)].
Adding a table to a post or page
This is where shortcodes come in. All TablePress shortcodes take the form
[table id=<the-ID> /]
Every table in TablePress has an ID number on the All Tables page. The Society Officers table ID is 2, so to insert it into a post, simply use the shortcode
[table id=2 /]
The basic shortcode pastes the entire table into the post or page. Sometimes we only want some of the table. For example, on the president’s post, we only want to display the presidents from the Society Officers table. To do this, we filter the table by the word “Pres” and only rows containing the word “Pres” are included.
[table id=2 filter="Pres" /]
If you actually went to the behind the scenes for the president’s post, you’d see that there are actually several more arguments for that table.
[table id=2 hide_columns="2,6,7"
datatables_buttons="colvis,copy,csv,excel,pdf,print" filter="Pres" /]
hide_columns argument allows you to hide columns. Simply select the number of the columns you do not wish to show.
[[datatables_buttons="colvis,copy,csv,excel,pdf,print"]] option causes the download buttons at the top of the table to appear and provides a column visibility filter for users.
There are many other shortcode options available. The important thing is to surround the shortcode with brackets, begin it with the table id, and remember that each argument takes the form