I am trying to show some posts in tabs and used part of the code shown above, however, the <p> are showing above the tabs and the links are not working. Any ideas about what I am doing wrong?
<?php
$t = '[tabs][tab title="Tab Title"]';
if (have_posts()) : while (have_posts()) : the_post();
$t.= '<p><a href="'.the_permalink().'">'. the_title().'</a></p>
[/tab]
[tab Title="Tab 2 Title"]
<p> Tab Content here</p>
[/tab][/tabs]';
endwhile; endif;
echo do_shortcode( $t );
?>
Thanks.