Guest User

Untitled

a guest
Sep 7th, 2015
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $args = array(
  3.     'posts_per_page' => 9,
  4.     'paged' => $paged
  5. ) ;
  6. $my_query = new WP_Query($args) ;?>
  7.  
  8. <section id="" class="container-fluid">
  9.  
  10.     <?php $count = 0  ?>
  11.  
  12.     <?php if ($my_query->have_posts()) : ?>
  13.         <div class="row">
  14.             <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
  15.  
  16.                 <article class="post col col-xs-12 col-sm-4">
  17.                     <h3> <a href="<?php the_permalink()  ?>"><?php the_title()  ?></a></h3>
  18.                     <p><?php  the_excerpt(); ?></p>
  19.                     <?php  $count++ ?>
  20.                     <p><a href="<?php echo get_permalink()  ?>">read more</a></p>
  21.                 </article>
  22.                 <?php if ( $count %3 == 0  ) { ?>
  23.         </div>
  24.         <div class="row">
  25.                 <?php   }         ?>
  26.         <?php endwhile;  ?>
  27.     <?php endif; ?>
  28.  
  29. </section> <!-- ENDS .container  -->
  30.  
  31. <footer class="pagination container-fluid clearfix">
  32.     <div class="col col-xs-12">
  33.         <?php   echo get_the_posts_navigation(  );   ?>
  34.     <?php wp_reset_postdata()  ?>
  35.     </div>
  36. </footer>
RAW Paste Data