Guest User

Untitled

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