Skip to content

Instantly share code, notes, and snippets.

@Prid13
Created July 6, 2018 02:39
Show Gist options
  • Save Prid13/ebe4c4d22803f9ec2281fa41d33163bd to your computer and use it in GitHub Desktop.
Save Prid13/ebe4c4d22803f9ec2281fa41d33163bd to your computer and use it in GitHub Desktop.
<?php $args = array('post_type' => 'proyecto', 'tag' => 'actual'); ?>
<?php $loop = new WP_Query($args); ?>
<?php if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); $postid=the_ID();?>
<div class="modal fade" id="myModal-<? the_ID(); ?>" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<?php
echo get_post_meta($postid, 'proyecto', true);
?>
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel"><?php the_field('project_name'); ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" id="modBody">
<?php the_field('project_video');?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else: ?>
<h1>No posts here!</h1>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment