Created
September 7, 2015 08:19
-
-
Save sunilw/669906f4207445b4a2a4 to your computer and use it in GitHub Desktop.
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
<?php | |
$args = array( | |
'posts_per_page' => 9 | |
) ; | |
$my_query = new WP_Query($args) ;?> | |
<section id="" class="container-fluid"> | |
<?php $count = 0 ?> | |
<?php if ($my_query->have_posts()) : ?> | |
<div class="row"> | |
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
<article class="post col col-xs-12 col-sm-4"> | |
<h3> <a href="<?php the_permalink() ?>"><?php the_title() ?></a></h3> | |
<p><?php the_excerpt(); ?></p> | |
<?php $count++ ?> | |
<p><a href="<?php echo get_permalink() ?>">read more</a></p> | |
</article> | |
<?php if ( $count %3 == 0 ) { ?> | |
</div> | |
<div class="row"> | |
<?php } ?> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
</section> <!-- ENDS .container --> | |
<footer class="pagination container-fluid"> | |
<?php echo the_posts_pagination(); ?> | |
</footer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment