The WordPress visual editor makes adding and editing your content super easy, but it does have some limitations. Like tables.
There’s no easy way to create tables built in to WordPress. If you need to display data in a table, that usually means manually coding the HTML, messing around with <tr> and <td> tags.
Thankfully there is an alternative. TablePress is a plugin designed to make creating tables really simple. And you don’t have to use any HTML if you don’t want to!
How to easily add tables in WordPress with TablePress
Install the plugin
Firstly, you need to install and activate the plugin. Don’t know how? No problem, check out this post for a free guide to adding plugins to your site.
Create a table
Now you should see a new TablePress option in your WordPress dashboard. Click on Add New Table.
Give your table a name. You can also add a description, and if you know how many rows and columns you need you can set it now. Don’t worry, you can change these settings later if you want. Click the Add Table button.
Now you see the table editing screen. At the top you have the main table settings, so if you want to edit the name or description you can do it here.
Next, add your data in the Table Content panel. For this example we’re going to create a quick table of contents, but you could use TablePress to display things like timetables, price lists, technical specifications and more.
Our table needs just 3 columns and 4 rows, so we need to delete the empty ones. To delete a row, check the box and click Delete from the options below. Do the same to delete the empty columns.
In the Table Manipulation panel you can also add more rows and columns, add a link or image, and you can use the Advanced Editor to format your text.
Click the Advanced Editor button, then click inside the cell you want to format. Then you have simple formatting options, like making the text bold or italic. And if you don’t mind a bit of HTML, you can use other formatting options, like a <h3> heading </h3> tag. We’re just going to make the columns headings bold.
From the table options panel, you have more formatting options. You can make the first row the table header, which will add some styling to it. You can also add alternating row background colours and choose whether the table title should be shown.
Display a table
When you’re done, click Save Changes.
To display your table within a page or post, there are two options.
Firstly, you can copy the table shortcode, shown at the top of the page, and paste that into your page or post where you want the table to appear.
Or, you can use the TablePress button that’s been added to the visual editor. Clicking that will show a list of all your tables, and you simply click Insert Shortcode on the table you’d like to use.
Customising your table
Preview your page or post and you should see your table. There are extras added to it, such as the search box and previous/next buttons.
You can turn these off by using the Features of the DataTables panel.
If you only want to display the table, with no extras, uncheck all the boxes. Or if you’d just like to turn off the previous/next buttons, you’d only uncheck the Pagination box.
And that’s it. TablePress offers an easy way to add tables to your site, without touching any code. But if you don’t mind a bit of code, you can add some custom CSS so you could match the colours, fonts and other styles to your theme.
For more WordPress tips and tutorials, be sure to check out WP Superstar, my eBook packed full of all my favourite tips, tricks and how-tos so you can make the most of your site.
Never miss a post
Sign up for actionable WordPress tips and advice, plus exclusive tips and offers, just for subscribers.