1. Home
  2. Documentation
  3. Posts Table Pro
  4. Posts Table Pro Shortcode Options
  5. Posts Table Pro – Full list of options

Posts Table Pro – Full list of options

This is a list of all the options available in Posts Table Pro, with links to full instructions for each option. You can use these to configure the [posts_table] shortcode in many different ways.

Table columns

Choosing which posts appear in the table

There are lots of ways to create a table listing specific posts only:

  • category – lists posts from a specific category
  • tag – lists posts with a specific tag
  • post_type – lists posts with a specific post type (e.g. products, events, or projects)
  • term – lists posts with a specific custom taxonomy term
  • cf – lists posts with a specific custom field value
  • year – lists posts published in a specific year
  • month – lists posts published in a specific month
  • day – lists posts published on a specific day of the month
  • author – lists posts by a specific author/user
  • status – lists posts with a specific status (e.g. Published)
  • exclude – excludes specific posts from the table based on ID
  • include – lists specific posts in the table based on ID
  • exclude_category – excludes entire categories of posts from the table
  • rows_per_page – sets the number of posts on each page of the table
  • post_limit – sets the maximum number of posts that can appear in the table

Sorting & ordering

  • sort_by – controls how the posts are sorted when the table first loads
  • sort_order – sorts the table in ascending or descending order
  • filters – add filter dropdown lists above the table
  • search_term – filter by search term when the table first loads

Control elements above & below the table

  • search_box – shows, hides or positions the keyword search box
  • reset_button – shows, hides or positions the reset link
  • page_length – shows, hides or positions the “Show <x> posts” dropdown list
  • totals – shows, hides or positions the post totals (e.g. “Showing 1 to 10 of 50 posts”)
  • pagination – shows, hides or positions the pagination buttons (previous, next etc)
  • paging_type – sets the pagination style
  • show_footer – shows or hides the footer row of the table
  • scroll_offset – changes the height that the page scrolls to when you move between pages in the table

Sizing & styling

  • widths – sets the width of each column
  • content_length – sets the number of characters in the ‘content’ column
  • excerpt_length – sets the number of characters in the ‘excerpt’ column

Images

  • image_size – sets the size of featured images in the table
  • lightbox – control whether your images open in a lightbox

Mobile visibility & responsive options

  • wrap – controls whether or not content is wrapped onto multiple lines
  • priorities – controls which columns are hidden on screen sizes when there are too many to fit on the page
  • column_breakpoints – provides fine-grained control over the breakpoints for each column when viewed on smaller screen sizes
  • responsive_control – controls the + icon which shows hidden rows
  • responsive_display – sets whether hidden rows are visible or hidden, or open in a modal window

Performance

  • lazy_load – improves performance by loading the overall page before the table, and loading 1 page of posts at a time
  • cache – whether to use caching to speed up table load time

Miscellaneous options

  • shortcodes – displays content generated by other shortcodes in the table (e.g. buttons or embedded audio or video players)
  • links – sets which columns in the table are clickable
  • search_on_click – controls whether clicking on a category, tag or custom taxonomy will filter the table or link to the relevant archive page
  • date_format – sets the date format for any date columns
  • date_columns – specifies which columns contain dates, so that the column can be sorted by date correctly
  • no_posts_message – controls the text that appears if no posts are found when the table first loads
  • no_posts_filtered_message – controls the text that appears if no results are found when a user searches or filters the table
  • numeric_terms – fixes any issues if you’re using numeric slugs for your categories or taxonomies

Posts table shortcode examples

To get you started, here are some popular examples of different ways to use Posts Table Pro.

Basic usage displaying all posts (see below for full list of columns):
[posts_table columns="image,title,content,date,author"]

Display posts from a single category (use the category slug or ID):
[posts_table columns="title,excerpt,tags" category="news"]

Display posts from several categories. This example shows posts in the “ebooks” category or the “audiobooks” category:
[posts_table category="ebooks,audiobooks"]

Display posts that belong to several categories. This example shows posts that are in the “featured”, “course”, and “health” categories:
[posts_table columns="name,short-description,tags,price,add-to-cart" category="featured+course+health"]

Exclude posts from a category. This example excludes posts in the “clients” category:
[posts_table exclude_category="clients"]

Display featured image. Defaults to 50 by 50 pixels, but you can specify a custom image size if you wish:
[posts_table columns="image,title,content" image_size="80x80"]

Choosing custom column headings:
[posts_table columns="title:Post Name,content:Description,Author:Written By"]

What else can I do?

Please also see our articles on advanced usage, which include advice on adding tables to category archive or search results pages, translating the posts table into other languagesdeveloper documentation, and more. We’ve also published a list of compatible third party plugins that you can use with Posts Table Pro.

Was this article helpful?

Related Articles