Term - Dynamic Shortcodes

Explore the functionality and use of Term Dynamic Shortcode, which allows advanced manipulation of term fields.

Updated over a week ago

The term Dynamic Shortcode in WordPress provides an advanced mechanism for retrieving fields from terms.

Syntax

{term:field@keyargs}
  • field: Specifies the term field to retrieve.

  • keyargs: A list of key arguments to refine the shortcode behavior. Key arguments are optional.

Key Arguments

  • id: Specifies the term ID to fetch data for.

Examples

  1. Basic Term Name Retrieval:

    {term:name}

    This retrieves the name of the current term.

  2. Fetching Description with Term ID:

    {term:description@id=45}

    Fetches the description of the term with ID 45.

  3. Retrieving Term Permalink:

    {term:permalink@id=12}

    Gets the permalink of the term with ID 12.

  4. Displaying Term Count:

    {term:count@id=8}

    Shows the count of posts associated with the term ID 8.

Did this answer your question?