Skip to content

Instantly share code, notes, and snippets.

@dlh01
Last active December 10, 2015 19:28
Show Gist options
  • Save dlh01/4481138 to your computer and use it in GitHub Desktop.
Save dlh01/4481138 to your computer and use it in GitHub Desktop.
<section class="cabinet">
<div class="cabinet-large">
<div class="media media-heading-medium">
<?php // The second post in the Headlines zone ?>
<?php $zone_query->the_post(); ?>
<?php [post stuff] ?>
</div><!--/.media-->
<?php
/**
* Display the third or fourth post in the Headlines zone in the
* large cabinet depending on the number of posts in the zone.
*/
?>
<?php if ( $zone_query->post_count > 8 ) : ?>
<div class="media media-heading-medium">
<?php $zone_query->the_post(); ?>
<?php [post stuff] ?>
</div><!--/.media-->
<?php endif; ?>
<?php if ( $zone_query->post_count > 12 ) : ?>
<div class="media media-heading-medium">
<?php $zone_query->the_post(); ?>
<?php [post stuff] ?>
</div><!--/.media-->
<?php endif; ?>
</div><!--/.cabinet-large-->
<?php // Display the remaining posts in the small cabinet ?>
<div class="cabinet-small">
<ul class="unstyled divided">
<?php while ( $zone_query->have_posts() ) : $zone_query->the_post(); ?>
<?php [post stuff] ?>
<?php endwhile; ?>
</ul>
</div>
</section><!--/.cabinet-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment