<?php
  $random_number = wp_rand( 111111, 999999 );
?>
<?php if ( $the_query->have_posts() ) : ?>
  <div id="accordion-<?php echo esc_attr( $random_number );?>" class="tm-sc tm-sc-faq tm-sc-faq-style2 panel-group accordion <?php echo esc_attr(implode(' ', $classes)); ?>">
	<?php $iter = 0; while ( $the_query->have_posts() ) : $the_query->the_post(); $iter++;?>
	<div class="panel">
		<div class="panel-title"> <a data-parent="#accordion-<?php echo esc_attr( $random_number );?>" data-toggle="collapse" href="#accordion-<?php echo esc_attr( $random_number.'-'.get_the_ID() );?>" class="<?php if ( $iter == 1) echo 'active';?>" aria-expanded="true">
		<span class="open-sub"></span> <strong><?php the_title();?></strong></a>
		</div>
		<div id="accordion-<?php echo esc_attr( $random_number.'-'.get_the_ID() );?>" class="panel-collapse collapse <?php if ( $iter == 1) echo 'in';?>" role="tablist" aria-expanded="true">
		<div class="panel-content">
			<?php the_content();?>
		</div>
		</div>
	</div>
	<?php endwhile; ?>
	<?php wp_reset_postdata(); ?>
  </div>

<?php else : ?>
  <?php educacion_mascot_no_posts_match_criteria_text(); ?>
<?php endif; ?>

