Created
March 31, 2017 01:12
-
-
Save deepak125/359096db3956fd4592c7dbace323cb13 to your computer and use it in GitHub Desktop.
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
<?php | |
$startup_loop = new WP_Query( | |
array( | |
'post_type' => 'startup', | |
'facetwp' => true, | |
'orderby' => array( | |
'meta_value_num' => 'DESC', | |
'post_date' => 'ASC', | |
), | |
) | |
); | |
if ($startup_loop->have_posts()) { | |
?> | |
<section class="section"> | |
<div class="container"> | |
<header class="filter-header"> | |
<div class="col-sm-4"> | |
<h4>All Startups</h4> | |
</div> | |
<div class="col-sm-8"> | |
<div class="filterWrap"> | |
<span>CLASS</span> | |
<?php echo facetwp_display( 'facet', 'industries' ); ?> | |
</div> | |
</div> | |
</header> | |
<div id="gallery-section" class="facetwp-template"> | |
<?php | |
while ($startup_loop->have_posts()) { | |
$startup_loop->the_post(); | |
$picture_size = get_field('picture_size'); | |
if (!$picture_size) | |
$picture_size = 'post-portrate'; | |
$class = wp_get_post_terms(get_the_ID(), 'sclass'); | |
?> | |
<?php if (has_post_thumbnail()) { ?> | |
<div class="mix"> | |
<a href="javascript:void(0);" data-toggle="modal" data-target="#class_<?php echo get_the_ID() ?>"><?php the_post_thumbnail('thumbnail'); ?></a> | |
<!-- Modal --> | |
<div class="modal fade" id="class_<?php echo get_the_ID() ?>" tabindex="-1" role="dialog" aria-labelledby="class1"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<div class="modal-body"> | |
<header> | |
<figure> | |
<?php the_post_thumbnail('medium_large'); ?> | |
</figure> | |
<figcaption> | |
<h4><?php the_title() ?></h4> | |
<span class="classname">Class: <?php echo $class[0]->name ?></span> | |
</figcaption> | |
</header> | |
<?php the_content() ?> | |
<a href="<?php the_field('website') ?>" class="btn btn-lg btn-primary">GO TO <?php the_field('website') ?></a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php } ?> | |
<?php } ?> | |
</div> | |
</div> | |
</section> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment