Advertisement
Guest User

Untitled

a guest
May 26th, 2014
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <div class="container">
  2.     <?php
  3.       $queryLasts = $wp_query;
  4.       $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
  5.       $args = array(
  6.  
  7.         'posts_per_page' => 5,
  8.         'ignore_sticky_posts' => 1,
  9.         'paged' => $paged,
  10.      );
  11.       $wp_query = new WP_Query( $args );
  12.  
  13.     $i = 1;
  14.     while ( have_posts() ) : the_post();?>
  15.               <div class="row">
  16.                 <div class="col-md-4 col-md-offset-2 excerpt">
  17.                   <?php get_template_part('templates/home', 'meta'); ?>
  18.                 </div>
  19.                 <div class="col-md-4">
  20.                   <a href="<?php the_permalink(); ?>">
  21.                         <?php the_post_thumbnail('imgthumb', array('class' => 'img-responsive'));?>
  22.                   </a>
  23.                 </div>
  24.               </div>
  25.       <?php
  26.       endwhile;
  27.       wp_reset_postdata();
  28.       ?>
  29.       <?php if ($wp_query->max_num_pages > 1) : ?>
  30.           <nav class="post-nav">
  31.             <ul class="pager">
  32.               <li><?php next_posts_link(__('&larr; Older posts', 'roots')); ?></li>
  33.               <li><?php previous_posts_link(__('Newer posts &rarr;', 'roots')); ?></li>
  34.             </ul>
  35.           </nav>
  36.       <?php endif; ?>
  37.       <?php  $temp_query = $wp_query ; ?>
  38.     </div>
Advertisement
RAW Paste Data Copied
Advertisement