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;
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args=array(
- 'post_type' => 'projects',
- 'posts_per_page' => 4,
- 'paged' => $paged
- );
- $temp = $wp_query;
- $wp_query = null;
- $wp_query = new WP_Query($args);
- 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><?php the_title(); ?></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