Skip to content

Instantly share code, notes, and snippets.

@ssbalakumar
Last active April 13, 2017 12:24
Show Gist options
  • Select an option

  • Save ssbalakumar/bf18fc703b21bb1a79a4e011ebd771f5 to your computer and use it in GitHub Desktop.

Select an option

Save ssbalakumar/bf18fc703b21bb1a79a4e011ebd771f5 to your computer and use it in GitHub Desktop.
<div class="row">
<?php
$query = new WP_Query(array(
'posts_per_page' => 3,
));
while ($query->have_posts()): $query->the_post(); ?>
<div class="col-md-4 col-sm-6 col-xs-12">
<article class="post-item">
<div class="post-tile">
<a href="<?php the_permalink(); ?>" class="media-box"> <?php echo get_the_post_thumbnail( get_the_ID(), 'large'); ?></a>
<div class="tile-date">
<span class="date-day"><?php echo get_the_date('d', $post->ID); ?></span>
<span class="date-month-year"><?php echo get_the_date('M Y', $post->ID); ?></span>
</div>
</div>
<div class="post-content">
<h1 class="tile-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php drhmcrcwp_excerpt('drhmcrcwp_custom_post'); ?>
</div>
</article>
</div>
<?php endwhile; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment