Pods - Dynamic Shortcodes

Discover how the Pods Dynamic Shortcode in WordPress can efficiently retrieve custom fields created with the Pods plugin.

Updated over a week ago

The Pods Dynamic Shortcode in WordPress is an advanced tool tailored for retrieving and manipulating custom fields created with the Pods plugin.

Syntax

{pods:arg@keyargs}
  • arg: A space-separated list of positional arguments, typically custom field names defined in Pods.

  • keyargs A list of key arguments.

Key Arguments

  • id (optional): Designates the ID of the post or custom content type to retrieve data from.

Examples

  1. Retrieve a Custom Field:

    {pods:custom_field_name}

    Fetches the value of 'custom_field_name' from the current post, where 'custom_field_name' is a field created with the Pods plugin.

  2. Custom Field with Specific Post ID:

    {pods:custom_field_name@id=10}

    Obtains the 'custom_field_name' value from the post with ID 10.

Did this answer your question?