Digitalraindrops

page-blog.php

Aug 18th, 2011
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.42 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: All Articles
  4.  *
  5.  * A custom page template Page Name = Category Name .
  6.  *
  7.  * The "Template Name:" bit above allows this to be selectable
  8.  * from a dropdown menu on the edit page screen.
  9.  *
  10.  * @package WordPress
  11.  * @subpackage Twenty_Ten
  12.  * @since Twenty Ten 1.0
  13.  */
  14.  
  15. get_header(); ?>
  16.  
  17.         <div class="row">
  18.             <div class="eightcol">
  19.                
  20.                 <?php
  21.                     $wp_query= null;
  22.                     $wp_query = new WP_Query();
  23.                     $wp_query->query('showposts=13'.'&paged='.$paged);
  24.                 ?>
  25.  
  26.                 <?php if ( $wp_query->have_posts() ) : ?>
  27.                    
  28.                     <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  29.                         <?php if(function_exists('wp_pagenavi') ) : ?>
  30.                                 <?php wp_pagenavi(); ?>
  31.                         <?php else: ?> 
  32.                             <?php twentyeleven_content_nav( 'nav-above' ); ?>
  33.                         <?php endif; ?>
  34.                     <?php endif; ?>
  35.                     <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
  36.                         <?php get_template_part( 'content', 'blog' ); ?>
  37.                     <?php endwhile; ?>
  38.                
  39.                     <?php if ( $wp_query->max_num_pages > 1 ) : ?>             
  40.                         <?php if(function_exists('wp_pagenavi') ) : ?>
  41.                                 <?php wp_pagenavi(); ?>
  42.                         <?php else: ?> 
  43.                             <?php twentyeleven_content_nav( 'nav-below' ); ?>
  44.                         <?php endif; ?>
  45.                     <?php endif; ?>
  46.                    
  47.                 <?php endif; ?>
  48.             </div><!-- eightcol -->
  49.             <div class="fourcol last"> 
  50.                 <?php get_sidebar('page'); ?>
  51.             </div>
  52.         </div><!-- row -->
  53.  
  54. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment