Topic: WP plugin: embed juicebox in template using do_shortcode()
I need to display a juicebox gallery from a shortcode in a WordPress custom field. I uploaded my files through this custom field and that went fine and even displays properly if I put the shortcode in the default editor.
However, whenever I try and parse the contents of the custom field to display the gallery, I get the message "WP-Juicebox Gallery Id cannot be found."
Here's some example code that's not working:
<?php
// Get the slideshow's Juicebox shortcode
$juicebox = get_post_meta( $post->ID, 'slideshow_embed', true);
if ( $juicebox ) {
// Render Juicebox shortcode inside div
echo '<div class="slideshow-container">';
echo do_shortcode( $juicebox );
echo '</div>';
}
?>
I've also tried
echo apply_filters('the_content', get_post_meta($post->ID, 'slideshow_embed', true));
to no avail.
Any ideas?