Create Tablepress tables which summarize and display information from Pods
Go to file
2021-02-08 13:54:50 -08: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 feat: Try to modify the TablePress menu 2021-02-08 09:37:53 -08:00
README.md feat: Try to modify the TablePress menu 2021-02-08 09:37:53 -08:00
tablepress-pods.php fix: try to redirect to admin-post.php 2021-02-08 13:54:50 -08:00
view-exportpods.php refactor: try to redirect exportpods to export 2021-02-08 13:34:46 -08: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, assuming you have cloned this repository:

  1. Make sure that you have committed your changes with an update to the Version parameter in tablepress-pods.php.
  2. Make sure the current git head is on the commit you want to build.
  3. From the top-level directory of the repository, execute bash mkplugin.sh.