Hello! I'm trying to use some nested shortcuts, but I'm not succeeding.
The shortcodes are these, in order of declaration in functions.php:
function p_generico_shortcode( $atts , $content = null )
{
return '<p class="pov generico">' . do_shortcode($content) . '</p>';
}
add_shortcode( 'pov-generico', 'p_generico_shortcode' );
Second:
function f_moca_shortcode( $atts , $content = null )
{
return '<p class="fala moca">' . do_shortcode($content) . '</p>';
}
add_shortcode( 'fala-moca', 'f_moca_shortcode' );
When attempting to use:
[fala-moca]TEXT[pov-generico]OTHER TEXT[/pov-generico][/fala-moca]
I'm getting:
<p class="fala moca">TEXT</p>
<p class="pov generico">OTHER TEXT</p>
Instead of:
<p class="fala moca">TEXT<p class="pov generico">OTHER TEXT</p></p>
I noticed that by nesting shortcodes that return HTML with different elements (eg p and span) it renders correctly.