I am having this issue while i modify my wordpress theme. I am displaying a post query of movies info. using while, and therefore i have a link to call a div that contains the trailer of each movie. However, when i click any of the links it only opens the trailer of the first movie. Meaning, i have to iterate trough ids to have an unique id for each post/movie and this iteration should be done in the a href and the div id.
<?php query_posts( $args ); ?><?php while ( have_posts() ) : the_post(); ?>
<a href="#modal">Trailer</a>
<div id="modal" class="modalmask">
<?php /* i call trailer iframe */ ?>
</div>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
¿How can i do this? Thanks.