Advertisement
Guest User

Untitled

a guest
Feb 17th, 2011
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Projects
  4. */
  5. ?>
  6.  
  7. <?php get_header();?>
  8.  
  9.     <section id="content">
  10.         <section id="main">
  11.  
  12.             <?php
  13.                 $i=1;
  14.                
  15.                 $temp = $wp_query;
  16.                 $wp_query = null;
  17.                 $wp_query = new WP_Query();
  18.                 $wp_query->query('post_type=projects' . '&paged=' . $paged . '&posts_per_page=4');
  19.                
  20.                 while ( $wp_query->have_posts() ) : $wp_query->the_post();
  21.             ?>
  22.            
  23.             <article class="post<?php if($i%2 == 0) { echo ' right'; }; $i++; ?>" id="post-<?php the_ID(); ?>">
  24.                 <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  25.                 <section class="entry">
  26.                     <?php the_excerpt(); ?>
  27.                 </section>
  28.             </article>
  29.            
  30.             <?php
  31.                 endwhile;
  32.                 wp_pagenavi();
  33.                 $wp_query = null;
  34.                 $wp_query = $temp;
  35.                 wp_reset_query();
  36.             ?>
  37.            
  38.             <section id="map">
  39.                 <img src="<?php bloginfo('template_url') ?>/images/interactive-map.jpg" alt="Interactive Map" />
  40.             </section>
  41.         </section>
  42.  
  43. <?php get_sidebar(); ?>
  44.    
  45.     </section>
  46.    
  47. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement