Toolset - Dynamic Shortcodes

Discover the Toolset Dynamic Shortcode and learn to integrate and use this powerful shortcode in your WordPress projects effectively.

Updated over a week ago

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 (alias fmt): Defines the format of the output. It can be set to normal for standard formatting or html for HTML formatting.

    {toolset:field @format=html}

Examples

  1. Custom Field Retrieval

    {toolset:field_name}

    Retrieves the value of the custom field custom_field_name from the current post.

  2. Custom Field and Keyargs

    {toolset:field_name@id=456}

    Retrieves the field called field_name of the post with ID 456.

  3. HTML Formatting

    {toolset:field_name@format=html}

    Retrieves the field called field_name of the current post and formats it as HTML.

Did this answer your question?