The Best Way to Create Tables in WordPress

The Best Way to Create Tables in WordPress

The out of the box functionality of the WordPress post editor is great, but if you’ve ever tried to add a table to one of your posts, then you will have quickly realised this is one almost-essential feature that is missing.

Thankfully as with almost anything you can envision doing in WordPress, someone else has already tried to do and not only that, but has probably built a plugin which allows you to do it with ease. In this case the plugin of choice for creating tables in WordPress is TablePress, a very popular free tool.

Today we are going to cover just how quickly and easily you can add a table to a WordPress post with this plugin, as well as taking a look at a few other plugins which can allow you to create more specific types of tables in WordPress, without writing any HTML or CSS.

TablePress

TablePress: Create Tables in WordPress

Tables Download RatingIt’s not often you see a plugin with a solid 5 out of 5 stars rating and over 250,000 downloads, but TablePress is one such plugin.

While there are other table builder plugins for WordPress out there, it’s safe to assume this is the best.

How to Create a Table in WordPress

As it’s a free plugin you can install it directly from your WordPress site via the official plugin repository, by going to Plugins > Add New and searching for TablePress.

Tables Install

With this plugin you must create your tables via the TablePress plugin dashboard and then insert them into your posts once they’ve been created. While you might have been expecting to see a ‘create table’ icon added to the post editor in a similar way to how MS Word, works, this isn’t the case with TablePress.

To create your first table, head over the newly added TablePress menu, and click on ‘Add New Table’ to create your first table with this plugin. The information you add here can be changed later, including the size, so don’t worry too much at this stage.

TablePress 01

Once you hit ‘Add Table’ you can then begin adding content to the table by filling in the cells. Simply click on a cell to enter some data. You can quickly jump to the next cell by clicking the tab key on your keyboard, or shift + tab to move to the previous cell. You can add numbers or words into your table and TablePress even supports formulas for carrying out calculations and other functions.

TablePress 02

If at any point you need to insert or delete any rows or columns, this can easily be done from the Table Manipulation options below the table itself. The other options available include:

  • Insert Link
  • Insert Image
  • Hide or show rows and columns
  • Duplicate or insert rows and columns
  • Merge cells using colspan or rowspan

You can also access a slightly more advanced cell editor from the Table Manipulation panel by clicking on the Advanced Editor and then clicking on the desired cell. This doesn’t give you access to all the features of the WordPress Post Editor, but it does give you a few more options than just entering plain text.

TablePress 03

There is also a Table Options panel which allows you to alter how the table is presented to your site visitors. These options include:

  • Make the first row a table header
  • Make the last row a table footer
  • Alternate the background row colours to help them stand out
  • Highlight a row when the mouse cursor hovers over it
  • Options for printing

Other options of TablePress include:

  • Enable the user to sort the table
  • Allow searching of the table to filter rows
  • Enable and set pagination
  • Enable horizontal scrolling

At any point during the table creation you can easily preview how it will look to end users by clicking the ‘Preview’ button, although the table might have a different appearance thanks to your custom or theme’s CSS files. You can also export or copy a table from this page. Once you are happy, click the ‘Save’ button.

Inserting the Table into a Post

Once you’ve created a table, you can now add it to a post or page. To do so, create a new post or page, or edit an existing one. From the post editor, click on the TablePress icon.

TablePress 04

From the modal window that is displayed, you can then insert the shortcode for the table you wish to display in your post.

TablePress 05

This won’t actually add the table to the post editor, but will instead insert a piece of text that looks something like this:

No Need For WordPress Developers — Drag & Drop With HeadwayNo Need For WordPress Developers — Drag & Drop With Headway
Genesis Framework for WordPressGenesis Framework for WordPress
Genesis Framework for WordPressGenesis Framework for WordPress
. However, once you preview or publish your post, you will be able to see the table.

TablePress 06

If you want to edit the table, you can click on the ‘Edit’ link that is displayed when you are viewing the post. This link is only shown to logged in users with the ability to edit posts, so don’t worry about it being visible to anyone who views your site as a reader. Another option for editing the table is to go back to the TablePress sidebar menu of the WordPress admin dashboard and click on ‘All Tables’ and then edit the table you wish to update.

Plugin Options

The plugin has a few options available which allow you to add custom CSS to your tables, which will influence the table styling. If you want to change the appearance of your tables then you can add your own code for the CSS selectors which the plugin uses, which are listed on the plugin documentation pages.

Other options allow you to set the language used for the plugin from the available options, as well as where the TablePress menu item is located on your admin dashboard sidebar menu.

Formulas in TablePress

This isn’t an obvious feature of TablePress but it is possible to add formulas to your table cells, in the same way you might do with Excel. There are many functions that can be used in your tables and you can view the list here.

TablePress Formulas

Import Data

For those who want to build tables using existing data, you will be pleased to know you can import data into this plugin in a number of formats.

With TablePress you can import data in the CSV format. This means you can save the data held in an Excel spreadsheet as a CSV file and then import it into your WordPress site. This is a great way to get a table from Excel into WordPress. The other table import options include HTML and JSON.

Extending TablePress

If all that functionality wasn’t enough for you, there are a number of extensions for TablePress. They are a mixture of free and premium options and can let you do many more things with this plugin. These extensions are installed like regular plugins and require TablePress to also be installed and activated in order to work.

View the TablePress Extensions

TablePress Conclusion

This is a brilliant plugin that is very easy to use. TablePress makes creating and displaying tables in WordPress very easy. If you ever need to add tabulated data to a WordPress site, installing this free plugin is the best way to get the job done. The homepage for the plugin has all the documentation you might ever need for getting the most out of this tool and is a worthy accompaniment to the plugin.

View TablePress

Building a Pricing Table

TablePress Pricing Table

If you want to add a pricing table to your WordPress site, TablePress might not be the best option. However, there are a few popular pricing table plugins that allow you to easily compare pricing plans and features in an attractive table. The most popular options for this sort of table are:

Conclusion

Hopefully now you have the ability to easily add a table to your WordPress posts and pages, without the need to edit any HTML or CSS. By using TablePress you can have attractive tables that can include formulas, and be inserted into your site in no time at all.

Have you used any other WordPress table plugins and how do they compare to TablePress?