1. Home
  2. Knowledge Base
  3. Posts Table Pro
  4. Posts Table Pro Features
  5. Displaying shortcodes in Posts Table Pro

Displaying shortcodes in Posts Table Pro

The shortcodes option allows your table to display content generated by any shortcodes used on your site.

Examples of shortcodes displayed in a table

There are lots of reasons why you might want to display shortcodes within a table. For example:

  • WordPress provides several built-in shortcodes for displaying audio files, videos, media playlists and image galleries. You can display these embedded media files directly in a table.
  • Your theme or another plugin might provide shortcodes to add buttons, icons or other styles. You can include these in a table.

Why don’t my shortcodes display in the table?

By default, shortcodes is set to false which will remove all shortcodes from your table. This is because:

  1. Processing shortcode content can take a significant amount of time – especially for large tables – so enabling them can have a performance impact on your site.
  2. Shortcodes often add HTML to the content which makes it difficult to limit content to a set number of words (see content_length and excerpt_length). For this reason, if you enable shortcodes, then the full content is always displayed and the content_length option is ignored.

How to display shortcode content in Posts Table Pro

You can display shortcodes in the table by adding shortcodes="true" to the Posts Table Pro shortcode.

Once you’ve done this, you can add shortcodes to any of the columns supported by Posts Table Pro.

Example:

[posts_table columns="image,title,content" shortcodes="true"]

Was this article helpful?

Related Articles