Does somebody know how to add a shortcode in a shortcode in a theme with the do_shortcode?
I have two shortcodes I want to use:
Grant access to membership types that I define:
[user_account_is#heltsjef|#sjef][/user_account_is]
Some text and links to dispaly some information to the mebership types:
[medlem]
I tried to accomplish this by adding the following code:
<?php echo do_shortcode("[user_account_is#heltsjef|#sjef][medlem][/user_account_is]"); ?>
But this didn't work. The first shortcode [user_account_is#heltsjef|#sjef][/user_account_is]
worked, but the [medlem]
shortcode was displayed as text.
How can I get the [medlem]
shortcode to function inside the [user_account_is#heltsjef|#sjef][/user_account_is]
?
Utkarsh Kukreti answers:
<?php echo do_shortcode(do_shortcode("[user_account_is#heltsjef|#sjef][medlem][/user_account_is]")); ?>
dolekjole comments:
Just what I needed!
Thanks!