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:
1 |
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?php /** * 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; }); |