Use Wordpress Shortcode in a Pod?

0

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?

asked Aug 10 '10 at 3:36

Ian

11

add comment
enter at least 15 characters

2 Answers

1

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); ?>

answered Aug 10 '10 at 4:55

clarinetlord

456

thanks clarinetlord - the first one worked fine, but I couldn't get the second working. – Ian Aug 11 '10 at 11:08
add comment
enter at least 15 characters
0

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');

answered Aug 10 '10 at 10:39

sc0ttkclark

2936

Good call, Scott. – clarinetlord Aug 11 '10 at 12:39
thanks Scott, but this didn't seem to work. Added it to precode and put shortcode into text area - no joy. I probably misunderstood – Ian Aug 11 '10 at 11:09
add comment
enter at least 15 characters