Столкнулся с проблемой при использовании цикла для вывода постов, не понимаю как при нажатии на пост перейти на модальное окно, в котором будет выводиться контент именно того поста, по которому кликнет пользователь.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink(); ?>">
<figure class="effect-lily">
<?php if (function_exists('add_theme_support'))
the_post_thumbnail (); ?>
<figcaption>
<div>
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
</div>
</figcaption>
</figure>
</a>
<?php endwhile; endif; ?>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
Надеюсь на ваше понимание )))