Skip to content

Instantly share code, notes, and snippets.

@ksascomm
Last active July 19, 2019 15:35
Show Gist options
  • Save ksascomm/2245d3aba6e593c3694e162772ebd850 to your computer and use it in GitHub Desktop.
Save ksascomm/2245d3aba6e593c3694e162772ebd850 to your computer and use it in GitHub Desktop.
<div class="grid-container">
<div class="grid-x grid-padding-x padding-top">
<?php $curated_content_query = new WP_Query($curated_content);
$count = 0;
if ($curated_content_query->have_posts()) : ?>
<div class="curated-posts grid-x">
<?php
while ($curated_content_query->have_posts()) : $curated_content_query->the_post();
$count++;
if ($count == 1 || $count == 6) :?>
<div class="cell small-12 large-6">
<?php get_template_part( 'template-parts/content', 'curated-large' ); ?>
</div>
<?php else: ?>
<div class="cell small-12 large-3">
<?php get_template_part( 'template-parts/content', 'curated-small' ); ?>
</div>
<?php endif; endwhile;?>
</div>
<?php wp_reset_postdata(); endif;?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment