Recently I created a shortcode for a theme that returned the content inside the shortcode with div tags around it.

Than I found out that shortcodes inside that div wouldn’t work anymore.

At stackoverflow I found this solution:
function my_div_shortcode($attr,$content){return '<div id="somediv">'.do_shortcode($content).'</div>';} add_shortcode("my_div_shortcode","my_div_shortcode");

because this shortcode uses the do_shortcode($content)  to render the content it does render the shortcodes inside the content as well.

As a user of multi languages on one site I find that a lot more plugins and functions should consider using the do_shortcode to present theire outcome.

No related content found.

Tags: , ,