Use Wordpress Shortcode in a Pod?
Is it possible to get my pod to interpret a wordpress shortcode? I've tried adding
<?php echo do_shortcode('[fs id=4]'); ?>
in my pod (desc) paragraph text area.
I'm using the FotoSlide plugin which allows me to use a shortcode format like so -
[fs id="2"]
Any tips?
2 Answers
The paragraph textarea won't execute PHP, but just put the shortcode in the field like you would for a normal wordpress post, and then when outputting it on a page do something like this:
<?php
$text = $Record->get_field('text');
echo do_shortcode($text);
?>
Or, better yet, attach a display helper to this field with this code:
<?php echo do_shortcode($value); ?>
Actually, you can enable many things by using this in your Pod Page Precode:
<?php
function pods_advanced_content($content) {
return apply_filters('the_content',$content);
}
add_filter('pods_content','pods_advanced_content');


