Most WordPress websites list posts list their posts in a standard blog-style format - either as a vertical list of posts or in a grid. Today, I'll tell you how to create a content table which lists your blog posts in a structured and searchable format.
If you want to display other content types in a table such as WordPress pages or custom post types, checkout our Posts Table Pro plugin.
Posts Table with Search & Sort
The Posts Table with Search & Sort plugin lists all your posts in a sortable HTML content table using a simple shortcode. It is powered by the jQuery DataTables plugin which we have converted to WordPress, allowing it to be used for WordPress posts for the first time.
There are plenty of ways for your visitors to search and filter the content table to find the posts they're looking for. They can select how many posts are displayed at a time, enter a keyword search in the box, click on any of the column headings to sort by that column, and click on a category or author to perform a filter. They can click the title of a post in the content table to read the full post.
We have also created options for you to control what information is displayed in the table, while keeping the plugin simple to use. You can:
- Specify which columns to display in the blog content table - choose from post id, title, content, category, author and date
- Choose the number of rows to display per page
- Specify a default column to sort by
- Choose the default sort order (i.e. ascending or descending)
- Switch off the ability to filter by clicking on a category or author
- Specify whether the content for each post should wrap onto multiple lines, or whether an expandable cross icon should be used instead
- Specify how many words of the post content should appear in the table
- You can even adjust the 'back to top' behaviour when your visitors click forward and back between the pages in the content table (useful if your website has a sticky header)
Who needs a WordPress posts content table?
There are many different scenarios where a WordPress website might benefit from a content table listing blog posts. For example, a blog with a large number of posts might want to display them in a more succinct and searchable format. This makes it easier for visitors to find posts on a specific topic. A WordPress website that uses posts as a knowledge base might want to display them in a more formal layout instead of a blog. A website may use posts as a document library. The table plugin provides the interactivity to search and filter by data such as topic or author.
If you store information as custom post types or pages instead of posts, check out Posts Table Pro. It lets you create a wider range of content tables.
WordPress posts are hugely flexible and can be used for many different purposes - both personal and professional. The Posts Table with Search & Sort plugin offers a new way of displaying them in a content table which wasn't possible before.
How can I use the plugin to create a sortable content table of posts?
To list your WordPress posts in a content table, simply add the following shortcode to any page, post or widget:[
Use the options described on the plugin page to refine your content table. For example, control which column are displayed or the default order.
Will it work on any website?
The content table plugin has been designed to work with different themes and environments. It is mobile friendly and the table will cleverly adapt to fit different screen sizes.
It's also WPML-compatible. If you have a multilingual website that uses the WPML plugin then the content table will automatically list posts for the correct language.
Where can I see it in action?
Download the plugin today
You can download the plugin from the WordPress plugin repository or search for 'Posts Table with Search & Sort' directly in the WordPress admin (go to Plugins > Add New).
We'd love to hear how you used the plugin to create your own content tables. Also tell us how we can improve it for you. Please leave your comments below or add a review or support request on the plugin page.
Go Pro - support for custom post types, custom fields and taxonomies
Since writing this post, we have also developed a premium version of Posts Table with Search & Sort -Posts Table Pro. I have amended this post to refer to the extra features available in Posts Table Pro. This should help you make an informed decision on which plugin to use for your content tables.
In a nutshell, Posts Table Pro works in the same way as the free plugin. However it has more features and can display your custom posts, pages, products, custom fields and custom taxonomies. It's designed for people who need to display other types of WordPress content in an interactive table.
Go Pro - display WooCommerce products in a table view
We also have a WooCommerce-specific version of Posts Table with Search & Sort - WooCommerce Product Table. This displays WooCommerce products in a content table. You can add columns for various WooCommerce fields including product name, description, price, reviews, add to cart button and more.