Can I add links, downloads, icons or buttons in Posts Table Pro?
You can also use Posts Table Pro to display custom links in the table - either as clickable text or as buttons, icons or images. These links can link to any URL, for example another page on your site, an external URL or a link to download a file (such as a PDF) in the Media Library.
You can add links to any text-based fields that you're displaying such as the content, excerpt or custom fields.
Please note - links from the ID, title, image, categories, tags or any taxonomy columns are created automatically by the plugin, and controlled via the links option.
Links in the content or excerpt columns
Links and other HTML in the main content are normally removed by Posts Table Pro. This is because the content is truncated using the content length option. If the HTML wasn't removed, the content could be split incorrectly and missing the necessary closing HTML tags such as
To preserve the HTML formatting, including links, you would need to set the content to display in full. You do this by setting the content length to -1.
The same applies to the excerpt column. If you wish to display links within the excerpt, you will need to set the excerpt length to -1.
Links in custom fields
Step 1: Create a custom field for storing the links
First, you need to create the custom field that you will use to add the links. You will then display this as a column in the table using Posts Table Pro.
Posts Table Pro works with any custom fields plugin. We particularly recommend Easy Post Types and Fields (free). By using a custom fields plugin, you can create more advanced links without writing any HTML code.
Use your chosen custom fields plugin to create a Visual Editor (WYSIWYG) custom field. Use this field to add the links that you wish to display in Posts Table Pro. Use the 'Insert/edit link' toolbar button to hyperlink the text.
In the following example, we have added a 'Link' custom field column to a table. This contains a range of different link and button styles:
Step 2: Add the custom field as a column in the table
To display your custom field, follow the instructions for creating custom field columns.
How to add clickable buttons, icons, and other types of link
The following video tutorial shows some examples of creating custom links, adding buttons and icons and displaying them in your posts table. You can see an example of how this might look in our WordPress document library demo.
If you want to create a button or icon, use a custom field to store the code or shortcode for your button/icon. The exact method for adding the button or icon will depend on your theme.
For example, your theme may provide a shortcode for buttons or icons. If you don’t know how to do this, ask your theme developer. If your theme doesn’t have the styles you need, you can use a plugin such as Shortcodes Ultimate to create buttons, or Better Font Awesome to create icons.
Note: If you are adding shortcodes to any of the columns displayed in Posts Table Pro, then you must enable the shortcodes option. This tells Posts Table Pro to display them correctly.
If you're adding shortcodes then you will also need to enable the Shortcodes option. This tells Posts Table Pro to display the links as clickable links instead of plain text.
Can I link the title or button column to an external URL or document download?
Yes! You can do this by using Posts Table Pro with the free Page Links To WordPress plugin. This plugin lets you add a URL to any page, post or custom post (e.g. to a PDF in your Media Library or a page on an external website). When someone clicks on a link to view the page/post/custom post, they will be taken to this URL instead.
For example, a lot of Posts Table Pro users find this helpful when creating a WordPress document library with downloadable document links in the table.