Video shortcode inside tabs shorcode NOT working

Make sure to wrap content with do_shortcode()

I’m not sure what the exact function looks like, but for simplicity sake take a look at this example:

//[tab]Content[/tab]
function tab_func($atts, $content = null) {
    extract( shortcode_atts( array(
    ), $atts ) );

    $output="<div class="tab">".do_shortcode($content).'</div>';

    return $output;
    }
add_shortcode( 'tab', 'tab_func' );

If you take a look at this line

$output="<div class="tab">".do_shortcode($content).'</div>';

you’ll see that I am wrapping content inside the do_shortcode function which will execute any short code that WordPress finds inside content.

So in your case [tab][/tab] would now execute the YouTube code inside your tab.

Caveat: In my experience, this only works 1 level deep. If you have another level of short code you need to execute inside of the content, you’ll need to make sure that those short code functions also include the do_shortcode function. i.e.:

[tab][/tab]

In this example, Video shortcode inside tabs shorcode NOT working wouldn’t display unless the shortcode function also included do_shortcode.

Hope this helps. For more information, take a look at the WordPress documentation for do_shortcode here.