1. Home
  2. Knowledge Base
  3. Posts Table Pro
  4. FAQ
  5. Can I add links, downloads, icons or buttons in Posts Table Pro?

Can I add links, downloads, icons or buttons in Posts Table Pro?

Posts Table Pro fully supports custom fields, which can be used to store extra data about your posts and display it in a table. You can use custom fields to add links, downloads, icons or buttons. For example, our WordPress document library demo includes a column which contains links, downloads, icons and buttons so you can see them all in action.

You may also be interested in our tutorial: How to Create a WordPress Document Library.

How to add buttons, icons etc. to your tables

  1. Create a custom field to store the download link (we recommend using the free Advanced Custom Fields plugin for this). Tick the box to add the custom field to whichever post type you’re displaying in the table.
  2. Add a clickable download link to the custom field for each post or custom post that you will be displaying in the table. Some tips:
    • If you want to display a text link, either add the link using the visual editor or add the full HTML code to create a link. (e.g. <a href="https://barn2.co.uk">DOWNLOAD</a>)
    • If you want to display a button link, add the HTML code or shortcode for your button into the custom field. This 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.).
  3. Use Posts Table Pro to create a table with a column for the custom field. See the example below, or our article on creating tables with Posts Table Pro.
  4. If you’ve added a shortcode to the custom field – for example to add a button – then you also need to add shortcodes="true" to the Posts Table Pro shortcode.

Screenshots

WordPress document library custom fields plugin

Example of custom fields for a document post which can be displayed in the table

WordPress document library download buttons

Example of a WordPress document library with buttons, links and icons in a ‘LINK’ custom field

Example shortcode

The following Posts Table Pro shortcode will create a simple table with columns for title and download link. It assumes that you are using a post type called ‘documents’ and your custom field name is ‘download’:

[posts_table post_type="documents" columns="title,cf:download" shortcodes="true"]

Was this article helpful?

Related Articles