Tutorial: How to Use the Posts Table Pro Sortable Table Plugin
Our sortable table WordPress plugin – Posts Table Pro – was released yesterday. It lets you display various types of content from your WordPress website in a searchable and sortable jQuery table.
Based on the jQuery DataTables plugin, your visitors can view your posts, pages or other content from your website in a fully sortable table.
You can set up the WordPress table to sort by any column by default, and you can change the default sort order. Your visitors can click the column headers to sort the table as they wish. They can also search for a keyword or filter the table by category, tag, custom taxonomy, etc.
In this video tutorial, I explain how to install and configure Posts Table Pro, using the example of a staff directory to help you create a sortable table. If you prefer written instructions, please see below for a step-by-step written tutorial.
The best WordPress sortable table plugin
The free plugin lets you display blog posts from your WordPress website in a searchable, sortable table. The Posts Table Pro plugin builds on this by adding support for custom post types, custom fields and custom taxonomies. It has various other options to create more sophisticated sortable tables.
Posts Table Pro is perfect for many different use cases including:
- If you have a staff custom post type, you could use it to create a staff directory
- Create a WordPress audio library or video gallery with embedded music and video
- If you’re storing data on books or music or something else then you can display it in a sortable table, WordPress member directory or other type of directory
- You might need a table of contents on your website, content table or index of pages. You can display your pages using a sortable table
- If you’ve got an e-commerce plugin, you can create a sortable table for your product catalogue. (If you use WooCommerce, checkout our dedicated WooCommerce Product Table plugin)
As you can see, the Pro plugin lets you create sortable tables in WordPress for many use cases that aren’t available with the free plugin.
How to set up the Posts Table Pro sortable table plugin
1. Install the plugin
- First of all, you purchase the plugin on our website and you download the plugin
- Then you go into your WordPress admin and go to Plugins > Add New
- Then you click Upload > Choose File and select the file that you downloaded after buying the plugin
- Click Open and then Install Now
- Once the plugin has successfully installed, we click to Activate it
- The final step for installation is to insert the license key. Under the Settings menu, we see a new line called ‘Posts Table Pro‘. Click on that, paste your license key and click Save Changes. You will have received your license key in the confirmation email after you bought the plugin. It makes the plugin work and allows you to receive updates when we release them
Now we’ll use the plugin to create a WordPress Staff Directory. It will add a simple staff list to your website with links to the staff profiles. The list will appear in a searchable, sortable table. You can use the plugin to display various types of content, so this is just an example.
2. Add the information to display in the WordPress table
Post Table Pro’s role is to create a sortable table of content already on your website. It does not create custom post types or taxonomies or anything, it just displays them. So you would add those previously using whatever method you’re using to set up your website and data. You then get Posts Table Pro to allow you to display that data within a table.
If you want a separate ‘Staff’ section in the WordPress admin to store your staff data, I recommend the Custom Post Type UI and Advanced Custom Fields plugins to create a custom post type and any extra fields of information. I used these to create a Staff custom post type and add various data relating to the staff profiles. Once you’ve decided how to store your staff data, go ahead and add all your staff members to the website.
3. Create your sortable table in WordPress
Go to Pages and then Add New, and create the page where you will be adding your sortable table. Add the title and any static information in the usual way.
To be honest, the table plugin can be as simple or as complicated as you want it to be. You can keep your WordPress tables really simple and just insert the basic shortcode [posts_table], which will insert a sortable table of your standard posts. Or you can configure it in much more advanced ways using the knowledge base.
Create sortable tables more easily
My tip is to go through the knowledge base and look at the examples for the options you’re interested in. Copy the shortcode that’s most relevant to what you want to do. So if you want to display a table of contents of your pages, then you’d copy the ‘Displaying pages’ shortcode example. If you’re displaying a custom post type, you would copy the custom post type shortcode. These are just examples of how you can create sortable tables but it’s a handy shortcut to get your table working quickly and easily. You can also find a table you like on the WordPress tables demo site and copy the shortcode underneath.
If you’re displaying a custom post type, you need to change the post_type=”” element of the shortcode. Add the correct slug for your WordPress post type between the quotation marks. It’s worth checking behind the scenes how your custom post type is set up to check you’ve got the syntax right.
When you have added your shortcode, click Publish and view the page with your sortable table.
The WordPress table probably won’t be exactly as you want it straight away. Use the knowledge base to configure the table in any way you choose. For example, you can choose which columns appear in the table, how it is sorted and the default sort order.
When you’ve finished, you will have created a searchable, sortable table of content from your WordPress site. Whatever you use it for, it lets you display information in new and exciting ways.