Guest User

Untitled

a guest
Jul 20th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.73 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Template Name: Portfolio 4 Columns Isotope Template
  4.  * Description: A Page Template that adds a portfolio to pages
  5.  *
  6.  * @package WordPress
  7.  * @subpackage Index
  8.  * @since Index 1.0
  9.  */
  10.  
  11. get_header(); ?>
  12.  
  13.         <div id="primary">
  14.             <div id="content" role="main">
  15.            
  16.             <?php if ( have_posts() ) : ?>
  17.            
  18.                 <?php while ( have_posts() ) : the_post(); ?>
  19.  
  20.                         <?php get_template_part( 'content', 'page' ); ?>
  21.  
  22.                     <?php endwhile; // end of the loop. ?>
  23.            
  24.             <?php endif; ?>
  25.            
  26.             <div id="block-portfolio-wrapper" class="clearfix">
  27.             <div id="block-portfolio" class="clearfix">
  28.                 <ul id="filters" class="clearfix option-set">
  29.                     <li>
  30.                         <a href="#" data-filter="*" class="selected"><?php _e( 'All Categories', 'higher' ) ?></a></li>
  31.                     </li>
  32.                     <?php wp_list_categories( array( 'title_li' => '', 'show_option_none' => '', 'taxonomy' => 'portfolio', 'walker' => new Walker_Portfolio_Category() ) ); ?>
  33.                 </ul>
  34.            
  35.             <div id="portfolio" class="clearfix">
  36.             <?php // Create a new query object. This will allow us to make proper use of our navigation ?>
  37.             <?php $wp_query = new WP_Query(); ?>
  38.             <?php $wp_query->query('post_type=portfolio&posts_per_page=2&post_status=publish'.'&paged='.$paged); ?>
  39.            
  40.             <?php  if ( $wp_query->have_posts() ) : ?>
  41.  
  42.                 <?php /* Start the Loop */ ?>
  43.                 <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
  44.  
  45.                     <?php get_template_part( 'content' ); ?>
  46.  
  47.                 <?php endwhile; ?>
  48.  
  49.             <?php endif; ?>
  50.            
  51.             <?php wp_reset_query(); ?>
  52.             </div><!-- #portfolio -->
  53.             </div><!-- #block-portfolio -->
  54.             </div><!-- #block-portfolio-wrapper -->
  55.            
  56.             </div><!-- #content -->
  57.         </div><!-- #primary -->
  58.  
  59. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment