Links in the posts table
Your posts table will automatically link certain columns to the relevant single post page, category archive page, or author archives. Use the Links option to disable them, or to have more fine-grained control over which columns are formatted as links.
Please note: links within the main content, excerpt or custom field columns are not controlled by the Links option. Please see our article on adding custom links for more information.
By default, your table will create the following links:
- The ID, title and image columns will link to the single post page.
- The categories, tags, and any taxonomy column will link to the relevant term archive page (if search on click is disabled.)
- The author column will link to the author archive page.
Setting the links option
allto make all possible columns in the table clickable (this is the default).
falseto disable all links to the single post page.
- 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)
[posts_table links="all"]- All possible columns will link to the single post page.
[posts_table links="none"]- All links to the single post page are disabled.
[posts_table links="title,terms"]- Only the title and custom taxonomy columns are clickable.
Links for custom taxonomy columns
If you want to have links from your custom taxonomy column, but not other columns (such as title), use
terms in your links option. E.g:
Note: you cannot use the taxonomy column name in the links option - instead, just add
terms to make all taxonomy columns clickable.
Links for custom fields
You cannot control custom field links using the links option. Please see our article on custom links for more information.
Search on click
By default, clicking on a category, tag or custom taxonomy term in the table will search (i.e. filter) the table by that value. If you are NOT using the lazy load option, then you can also filter the table by clicking on an author.
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. This is only available as a shortcode option.
[posts_table columns="title,categories,tags" search_on_click="false"]
Tip: This option will only work correctly if your theme includes archive pages for categories/tags/custom taxonomy terms.
Can I link the title 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.
Adding other types of links, such as downloadable documents and custom fields
The above instructions tell you how to control the links to the single post page. You can also use Posts Table Pro to create other types of link, for example links to a third party URL or a downloadable document. You can add these links as clickable text, or you can even add clickable buttons, images or icons.
Please see our separate article on how to do this.