Why does this display the shortcode but not the original way?
-
I currently have a custom template in which I’m extracting the shortcodes from the post and attempting to embed them in a custom post format.
I’ve tried this:
echo do_shortcode('[amazon asin=1442229012&template=iframe image]');
And this will not display the widget. However, this will:
echo apply_filters( 'the_content',' [amazon asin=1442229012&template=iframe image] ');
This StackOverflow post (which is where I found the solution), said this is because it’s not a “true” shortcode. Any idea what this means?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Why does this display the shortcode but not the original way?’ is closed to new replies.