As a follow up to my recent post on custom fields I ran into another issue revolved around plugins or the built in WordPress gallery codes not working in custom fields.
Since those codes only work inside the post/page’s content a filter needs to be applied.
Nothing has changed the setup:
ID, 'slideshow', true); ?>
and instead of,
<? php echo $image; ?>
[/sourcecode ]
we'll apply the filter,
[sourcecode language='php']
<? php
$img = ''.$image.'';
$img = apply_filters('the_content', $img );
echo $img;
?>;
This could help in appending your custom fields too, for example you could setup the custom field for a code input only and wrap the value. Example,
[sourcecode language='php']
$id = ””;
$id = apply_filters(‘the_content’, $id );
echo $id;
[/sourcecode ]
A value “3″ would create ““.
