Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Projects
- */
- ?>
- <?php get_header();?>
- <section id="content">
- <section id="main">
- <?php
- $i=1;
- $temp = $wp_query;
- $wp_query = null;
- $wp_query = new WP_Query();
- $wp_query->query('post_type=projects' . '&paged=' . $paged . '&posts_per_page=4');
- while ( $wp_query->have_posts() ) : $wp_query->the_post();
- ?>
- <article class="post<?php if($i%2 == 0) { echo ' right'; }; $i++; ?>" id="post-<?php the_ID(); ?>">
- <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
- <section class="entry">
- <?php the_excerpt(); ?>
- </section>
- </article>
- <?php
- endwhile;
- wp_pagenavi();
- $wp_query = null;
- $wp_query = $temp;
- wp_reset_query();
- ?>
- <section id="map">
- <img src="<?php bloginfo('template_url') ?>/images/interactive-map.jpg" alt="Interactive Map" />
- </section>
- </section>
- <?php get_sidebar(); ?>
- </section>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement