1. Home
  2. Documentation
  3. Posts Table Pro
  4. Posts Table Pro Shortcode Options
  5. Links in the posts table

Links in the posts table

Posts Table Pro lets you control what happens when someone clicks on an item in the table.

The links option controls which columns in the table are formatted as hyperlinks or plain text. For example, if you are displaying featured images in your table, then you can choose whether or not these can be clicked on to access the single post page.

By default, the following columns are formatted as links: idtitlecategoriestags, author, image, and any custom taxonomy. Clicking on a category, tag, author, or custom taxonomy term will filter the table for that value. (You can change this using the search on click option, below.) Clicking on an ID, title or image will take the user to the single post page.

WordPress table default column links

You can control which columns are clickable by adding the links option to the posts table shortcode:

  • Add links="all" to make all possible links in the table clickable.
  • Use links="none" or links="false" to disable all links.
  • You can also use any combination of the following keywords, as a comma-separated list:
    • id – The ID column will be clickable (links to post)
    • image – The image column (links to post)
    • title – The title column (links to post)
    • author – The author column (links to author archive page)
    • categories – The categories column (links to category archive page)
    • tags – The tags column (links to tag archive page)
    • terms – Any custom taxonomy column (links to taxonomy archive page)

In this example, only the title and custom taxonomy columns will be clickable:

[posts_table columns="image,title,author,categories,tax:my_tax" links="title,terms"]

Search on click

By default, clicking on a category, tag, author or custom taxonomy term in the table will search (i.e. filter) the table by that value. This is a quick way of filtering the table if you have lots of posts.

You can disable this search_on_click feature so that when someone clicks on a category, tag, author or custom taxonomy term, then they will be taken to the relevant category/tag/author/taxonomy archive instead.

Example: [posts_table columns="title,categories,tags" search_on_click="false"]

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.

Was this article helpful?

Related Articles