/gist:8b694cc182a04610de16 Secret
Created
September 30, 2014 02:25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is what I am doing: | |
<div class="slide-view"> | |
<div class="swiper-container"> | |
<!-- If modal code is placed outside of swiper-wrapper, it works --> | |
<div class="swiper-wrapper"> | |
<?php | |
$args = array( | |
'post_type' => 'projects', | |
'posts_per_page' => 2000, | |
'orderby'=> 'title', | |
'order' => 'ASC', | |
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1), | |
); | |
query_posts($args); | |
while(have_posts()): the_post(); ?> | |
<div class="swiper-slide" data-hash="<?php echo the_slug(); ?>"> | |
<h3> | |
<div class="slider single-item"> | |
<?php foreach ($cfs->get('our_work_gallery') AS $g): ?> <!-- open external loop --> | |
<div><img class="img-responsive" src="<?php echo $g['gallery_image']?>"></div> | |
<?php endforeach ?> | |
</div> | |
<h4 class="project-cat"> | |
<?php $project_terms = wp_get_object_terms( get_the_ID(), 'taxonomy'); | |
$args= array( | |
'fields' => 'ids' | |
); | |
if(!empty($project_terms)){ | |
if(!is_wp_error( $project_terms )){ | |
foreach($project_terms as $term){ | |
echo ''.$term->name.''; | |
} | |
} | |
} ?> | |
</h4> | |
<h1 class="featured-press-title"><?php the_title(); ?></h1> | |
</h3> | |
<!-- code for modal --> | |
<div class="morph-button morph-button-modal morph-button-modal-1 morph-button-fixed"> | |
<button type="button" class="read-more-button">Read More</button> | |
<div class="morph-content"> | |
<div> | |
<div class="content-style-text"> | |
<span class="icon icon-close">Close the overlay</span> | |
Overlay Test | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- morph-button --> | |
</div> | |
<?php endwhile; | |
wp_reset_query(); // Restore global post data stomped by the_post(). | |
?> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment