I want to show the content of my post in a separate row one at a time whenever a tab is clicked. I already achieved this but the problem is, its showing the output for only the last tab. Other tabs are not doing anything.
I guess I need a for loop to store all my contents in an array and then output in the second row.
<div class="page-tile row">
<?php $i = 0; ?>
<?php while( $page_query->have_posts() ) : $page_query->the_post(); ?>
<div class="tile col-lg-2 col-md-2 col-sm-2 col-xs-12">
<a class="nav nav-tabs" role="tablist" href="#collapse-<?php the_ID(); ?>" data-toggle="tab" aria-expanded="false" aria-controls="collapse-<?php the_ID(); ?>">
<?php the_post_thumbnail("kontakt-thumb",array('class' => 'img-responsive')); ?>
</a>
</div>
<?php ob_start() ?>
<div class="kontakt-content tab-content">
<div class="tab-pane" role="tabpanel" id="collapse-<?php the_ID(); ?>"> <?php echo the_content(); ?> </div>
</div>
<?php $output = ob_get_clean(); ?>
<?php $i++; ?>
<?php endwhile; ?>
Need to show the content below when a tab is clicked.`
`