Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. <?php
  2.  
  3.     /* Template Name: Page Blog */
  4.  
  5. ?>
  6. <?php get_header(); ?>
  7.    
  8.     <div class="container">
  9.        
  10.         <div id="content">
  11.        
  12.             <div id="main">
  13.                
  14.                 <?php
  15.                
  16.                 $current_page = (get_query_var('paged')) ? get_query_var('paged') : 1;
  17.  
  18.                 $args = array(
  19.                     'posts_per_page' => 6, // Change this to however many posts per page they want.
  20.                     'paged'          => $current_page
  21.                 );
  22.                 query_posts( $args );
  23.                
  24.                 ?>
  25.                
  26.                 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  27.                
  28.                     <?php get_template_part('content'); // currently set to standard layout. If they want grid we'll need to add in the <ul class="sp-grid"> as well. ?>
  29.                
  30.                 <?php endwhile; ?>
  31.                
  32.                 <?php solopine_pagination(); ?>
  33.                
  34.                 <?php endif; ?>
  35.            
  36.             </div>
  37.  
  38. <?php get_sidebar(); ?>
  39. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement