Create Tablepress tables which summarize and display information from Pods
Go to file
2020-09-14 04:34:18 +00:00
.gitattributes Add the code of the plugin 2019-09-14 11:42:34 -04:00
.gitignore Add the code of the plugin 2019-09-14 11:42:34 -04:00
LICENSE Initial commit 2019-09-14 14:29:57 +00:00
mkplugin.sh Add the code of the plugin 2019-09-14 11:42:34 -04:00
README.md Add comments suggeted by Steve Lane to the README file 2020-09-14 04:34:18 +00:00
tablepress-pods.php Add the code of the plugin 2019-09-14 11:42:34 -04:00

tablepress-pods

Abstract

Create Tablepress tables which summarize and display information from Pods

Description

This project is an extension to the TablePress plug-in (see https://tablepress.org/) for WordPress (https://wordpress.org/). It is not useful without the TablePress plug-in. This project is not part of TablePress, but designed to work with it and extend its capabilities.

This project also assumes that you have installed the Pods plug-in (see https://pods.io/) in your WordPress installation. It is also not useful without the Pods plug-in.

The tablepress-pods extension allows you to extract and display in Tablepress tables information from the content in Pods custom post types and taxonomies. If you use Pods and would like to produce tables from the information you've stored in them, this extension is potentially very useful.

Installation

Download a release from https://code.studioinfinity.org/glen/tablepress-pods/releases (as a zip file) and install and activate in your WordPress site like any other extension in zip format. (Namely, from your Dashboard, select Plugins, click on add new, and then browse to the downloaded zip file on your disk.)

Usage

This extension operates by adding additional parameters to the [table id=NN /] shortcode. For a list of the provided parameters and their meanings, see the source file tablepress-pods.php. For it to be useful, you then need to go to the table definition (in the Tablepress tabs from the Dashboard) of the corresponding table and use Pods "magic tags" within that table.

Here's a brief example:

[table id=2 pod_name="problem" /]

together with a definition of table 2 in Tablepress that looks like

A B
1 Number Title
2 {@number} <a href="{@permalink}">{@title}</a>

will produce a two-column table that lists the number and title of each "problem" in the Pod, with the title being a link to the problem.

Note that the {}-expressions allowed in the entries of the table definition include arbitrary Pods "magic tags" syntax. So for example in my installation, which categorizes articles from a periodical, I have such expressions as {@issue.issue_number} and {@section.permalink}. You can also use the custom postprocessing argument, e.g. {@source, list_of_links_to_terms} (where "list_of_links_to_terms" is defined in the functions.php of my theme).

Building

To produce an installable zip file, change directories into a git clone of this repository, and simply execute the command in mkplugin.sh (for example, via bash mkplugin.sh). Note that currently you must update the version number in the mkplugin.sh command.