For the complete documentation index, see llms.txt. This page is also available as Markdown.

[acpt_tax]

Display a taxonomy term meta field value

Displays a taxonomy / term meta field value. If no term ID is provided, get_queried_object() is used to determine the current term.

Usage

[acpt_tax box="box_name" field="field_name"]

Specify a term ID explicitly:

[acpt_tax tid="234" box="box_name" field="field_name"]

Parameters

Parameter
Required
Description

box

Required

The meta box name

field

Required

The field name

tid

Optional

The term ID. Defaults to the queried term.

All shared parameters are also accepted.

Example

Display a custom date field on a taxonomy archive page:

$termId = get_queried_object()->term_id;
echo do_shortcode('[acpt_tax tid="' . $termId . '" box="box_name" field="date_field" date-format="d/m/Y"]');

Last updated