Reputation: 1405
If you have a shortcode that is created like this:
[shortcode1 attribute1="content" attribute2="content with [shortcode2] too"]
because shortcode2 is being used this way, it is breaking shortcode1. How do I extract the attribute2 content and then execute the shortcode2?
Currently I am extracting the attributes like this:
extract( shortcode_atts( array(
'attribute1' => '',
'attribute2' => ''), $atts ) );
But having shortcode2 in an attribute breaks the output completely.
Anyone know how to do this? Thanks
Upvotes: 0
Views: 232
Reputation: 64476
You need to call do_shortcode()
for the content of attribute2
when returning from first shortcode function call
Like do_shortcode($atts['attribute2']);
Upvotes: 0