Using Shortcodes in Pods Templates

In order for Shortcodes to be processed in Pods Templates, you do need to make some changes to your configuration.

By default including a shortcode within a Pods shortcode (nesting it within the “pods” shortcode or building a shortcode within a Pods Template or Custom Template with Magic Tags) will not work. If you need this functionality to work, you need to include the following constant in your wp_config.php file:

define('PODS_SHORTCODE_ALLOW_SUB_SHORTCODES',true);

If you need to parse a shortcode within the Pods template, custom template or within your Pods shortcode, just add  shortcodes=1  to the Pods shortcode.
If you don’t want to have to remember to do that, you can include the following function within your functions.php for the theme or within your own plugin files if you’ve chosen to include your Pods code in it’s own plugin:

/**
 * Allow Pods Templates to use shortcodes
 *
 * NOTE: Will only work if the constant PODS_SHORTCODE_ALLOW_SUB_SHORTCODES is
 * defined and set to true, which by default it IS NOT.
 */
add_filter( 'pods_shortcode', function( $tags )  {
  $tags[ 'shortcodes' ] = true;
  
  return $tags;
  
});

Shortcodes and auto-templates.

If you are using auto-templates then you need to make sure the hook you’ve used also runs shortcodes.
For posts the default hook is the_content  which both run shortcodes by default.

If you’ve used a hook that doesn’t run shortcodes by default you need to add the do_shortcode callback to the hook you’ve chosen.
Example; if you used the default author hook get_the_author_description or the_excerpt, you can include the following function within your functions.php for the theme or within your own plugin files if you’ve chosen to include your Pods code in it’s own plugin:

/**
 * Run shortcodes on the `get_the_author_description` hook.
 */
add_filter( 'get_the_author_description', 'shortcode_unautop' );
add_filter( 'get_the_author_description', 'do_shortcode' );

Other Helpful Documentation on Pods Templates

Auto Templates

Auto Templates allows your Pods Templates to be output automatically in Singular and List (Archive) views on your site.

Limitations of Magic Tags and Pods Templates

Pods Templates and Magic Tags were never intended to completely replace the power of PHP or WordPress Theme Templates. We discuss many of the limitations in this document and possible alternatives or workarounds.