Add this code in Child theme functions.php file :
/*-----------------------------------------------------------------------------------*/ /* Nested Tabs Shortcodes /*-----------------------------------------------------------------------------------*/ if (!function_exists('inside_tabs')) { function inside_tabs( $atts, $content = null ) { extract(shortcode_atts(array( 'style' => '', 'theme' => '' ), $atts)); $defaults=$tab_icons = array(); extract( shortcode_atts( $defaults, $atts ) ); // Extract the tab titles for use in the tab widget. preg_match_all( '/inside_tab title="([^\"]+)" icon="([^\"]+)"/i', $content, $matches, PREG_OFFSET_CAPTURE ); $tab_titles = array(); if(!count($matches[1])){ preg_match_all( '/inside_tab title="([^\"]+)"/i', $content, $matches, PREG_OFFSET_CAPTURE ); if( isset($matches[1]) ){ $tab_titles = $matches[1];} }else{ if( isset($matches[1]) ){ $tab_titles = $matches[1]; $tab_icons= $matches[2];} } $output = ''; global $random_number; if( count($tab_titles) ){ $output .= '<div id="vibe-tabs-'. rand(1, 100) .'" class="tabs tabbable '.$style.' '.$theme.'">'; $output .= '<ul class="nav nav-tabs clearfix">'; foreach( $tab_titles as $i=>$tab ){ $tabstr= str_replace(' ', '-', $tab[0]); $tabstr=preg_replace('/[^A-Za-z0-9\-]/', '', $tabstr); $check_url = strpos($tab_icons[$i][0],'http'); if(isset($tab_icons[$i][0]) && $check_url !== flase && $check_url<2){ $href = $tab_icons[$i][0]; }else{ $href='#inside_tab-'. $tabstr .'-'.$random_number; } $output .= '<li><a href="'.$href.'">'; if(isset($tab_icons[$i][0])) $output.='<span><i class="' . $tab_icons[$i][0] . '"></i></span>'; $output .= $tab[0] . '</a></li>'; } $output .= '</ul><div class="tab-content">'; $output .= do_shortcode( $content ); $output .= '</div></div>'; } else { $output .= do_shortcode( $content ); } return $output; } add_shortcode( 'insides', 'inside_tabs' ); } if (!function_exists('inside_tab')) { function inside_tab( $atts, $content = null ) { $defaults = array( 'title' => 'Tab' ); extract( shortcode_atts( $defaults, $atts ) ); global $random_number; $tabstr= str_replace(' ', '-', $title);// $tabstr=preg_replace('/[^A-Za-z0-9\-]/', '', $tabstr); return '<div id="inside_tab-'. $tabstr .'-'.$random_number.'" class="tab-pane"><p>'. do_shortcode( $content ) .'</p></div>'; } add_shortcode( 'inside', 'inside_tab' ); }
Now instead of using tabs shortcode like :
[tabs]
[tab title="XXX]
[tabs]
[tab title="YYY"]content[/tab]
[/tabs]
[/tab]
[/tabs]
.......
change it to
[tabs]
[tab title="XXX]
[insides]
[inside title="YYY"]content[/inside]
[/insides]
[/tab]
[/tabs]