1. Home
  2. Knowledge Base
  3. Posts Table Pro
  4. Advanced Usage

Adding post tables to archive pages

While Posts Table Pro is primarily designed for use on standard WordPress pages, it can also be used on category, tag, custom taxonomy, date and author archive pages by overwriting the archive template in your theme.

How to add post tables to the archive template

You can download an example ‘archive.php’ template from this link. This will display a posts table for all archive pages in your theme. It’s important to note that this is just an example, and you will most likely need to modify this to work with your theme. A good way to do this is to look at the other templates in your theme, and copy the HTML structure into the sample archive template.

You should also be aware of the order of precedence with theme templates. For example, if your theme contains both a category.php file and an archive.php file, the category.php one will take precedence - you will need to either remove the category.php file or add the posts table code to that file as well.

You may want to modify the shortcode in the template to suit your requirements – for example, to select which columns are displayed. See the rest of this documentation for details.

Automatically displaying a posts table on your archive pages isn’t straightforward and if you’re not comfortable with these instructions then we recommend that you ask your web developer, or send us a support request to get a quote from our customisations service.

Can I use a different shortcode for each category or taxonomy?

The above instructions assume that you'll have the same shortcode for each category. To dynamically use different shortcodes depending on the current category, you would need to do some extra modification to the code in the template.

This falls is outside the scope of our standard plugin support. If you don't know how to do the required coding, then we recommend that you post a job on Codeable where one of their WordPress experts can quote for the work.

We've partnered with Codeable to provide our customers with expert help if required.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.