Добрый день!
Как реализовать аккордеон от Boostrap 3 на вордпресс?
Хотел сам как то сделать, но не получилось(
Вот код:
<?php
$id=15;
$n=20;
$recent = new WP_Query("cat=$id&showposts=$n");
while($recent->have_posts()) : $recent->the_post();
?>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="<?php the_ID(); ?>">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#<?php the_ID(); ?>" aria-expanded="true" aria-controls="<?php the_ID(); ?>">
<?php the_title(); ?>
</a>
</h4>
</div>
<div id="<?php the_ID(); ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="<?php the_ID(); ?>">
<div class="panel-body">
<?php the_content(); ?>
</div>
</div>
</div>
</div><!--row-END-->
<?php endwhile; ?>