Created
July 30, 2014 18:46
-
-
Save awhedbee22/9ae0344da27ffd11f946 to your computer and use it in GitHub Desktop.
Livestock display loop
This file contains hidden or 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
<ul class="small-block-grid-2 large-block-grid-4"> | |
<?php | |
$topTwelveCoral = array( | |
'post_type' => 'livestock', | |
'posts_per_page' => 8 | |
); | |
$my_query = new WP_Query( $topTwelveCoral ); | |
while ($my_query->have_posts()) : $my_query->the_post(); | |
// Don't show duplicates | |
$do_not_duplicate = $post->ID; | |
?> | |
<li class="livestock-item ih-item square effect6 from_top_and_bottom"> | |
<div class=" ih-item square effect6 from_top_and_bottom"> | |
<a href="#<?php echo $post->post_name;?>" data-reveal-id="<?php echo $post->post_name;?>"> | |
<div class="img"> | |
<?php | |
$itemcrop = "h=400&w=400&zc=1&q=100"; | |
echo get_image('coral_info_featured_photo', 1, 1, 1, null, $itemcrop); ?> | |
</div> | |
<div class="info"> | |
<h4><?php the_title(); ?></h4> | |
<p class="show-for-medium-up"><?php echo get('coral_info_description'); ?></p> | |
</div> | |
</a> | |
</div> | |
</li> | |
<div id="<?php echo $post->post_name;?>" class="reveal-modal full" data-reveal> | |
<div class="row"> | |
<div class="medium-7 large-8 columns"> | |
<?php echo get_image('coral_info_featured_photo'); ?> | |
</div> | |
<div class="medium-5 large-4 columns panel"> | |
<h2><?php the_title(); ?></h2> | |
<h4><?php echo get('coral_info_type'); ?></h4> | |
<p class="lead"><?php echo get('coral_info_description'); ?></p> | |
<span class="care-<?php echo get('coral_info_care'); ?>"></span> | |
<span class="lighting-<?php echo get('coral_info_lighting'); ?>"></span> | |
<span class="flow-<?php echo get('coral_info_flow'); ?>"></span> | |
<a href="<?php the_permalink() ?>" class="right">+more</a></p> | |
</div> | |
<a class="close-reveal-modal">×</a> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment