The Toolset Dynamic Shortcode is a versatile shortcode in the Dynamic Shortcodes framework, designed to interact with the Toolset plugin in WordPress. It allows for the retrieval and display of custom fields and other metadata associated with posts or pages.
Syntax
{toolset:field}
field
: The name of the metadata or custom field to be retrieved.
Key Arguments
id
: Specifies the ID of the post from which to retrieve the metadata. If omitted, the current post ID is used.{toolset:field @ID=3}
format
(aliasfmt
): Defines the format of the output. It can be set tonormal
for standard formatting orhtml
for HTML formatting.{toolset:field @format=html}
Examples
Custom Field Retrieval
{toolset:field_name}
Retrieves the value of the custom field
custom_field_name
from the current post.Custom Field and Keyargs
{toolset:field_name@id=456}
Retrieves the field called
field_name
of the post with ID 456.HTML Formatting
{toolset:field_name@format=html}
Retrieves the field called
field_name
of the current post and formats it as HTML.