Links in the posts table
Posts Table Pro lets you control what happens when someone clicks on an item in the table.
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:
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.
You can control which columns are clickable by adding the
links option to the posts table shortcode:
links="all"to make all possible links in the table clickable.
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.
[posts_table columns="title,categories,tags" search_on_click="false"]