do_shortcode soesn't work
-
Hi,
I need to use do_shortcode to execute the code from a custom template via custom fields. Here’s what I’m doing:
$shopSection = get_post_meta($post->ID, 'SS_id', true);
$options = get_option('sample_theme_options');
$shopName = $options['sometext'];
echo do_shortcode( '[etsy-include=' . $shopName . ';' . $shopSection . ']' );
This simply prints:
[etsy-include=MandaCrafts;5557344]
to the page instead of being translated by WordPress.
If I paste the same shortcode into the main content editor then it works fine so I know the shortcode is fine. The plugin is not processing it correctly.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘do_shortcode soesn't work’ is closed to new replies.