Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Projects
- */
- ?>
- <?php get_header(); ?>
- <div id="content">
- <div id="contentwide">
- <div class="postarea_wide">
- <?php
- /*Setting up our custom query (In here we are setting it to show 12 posts per page and eliminate all sticky posts) */
- $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
- $query = new WP_Query( array ( 'category_name' => 'decorating-home', 'posts_per_page' => 9, 'paged' => $paged ) );
- if($query->have_posts()) : while($query->have_posts()) : $query->the_post();
- ?>
- <div class="proj">
- <div class="postimage">
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('project-thumb'); ?></a>
- </div>
- <div class="proj-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></div>
- </div>
- <?php
- if(($query->current_post+1)%3 == 0){
- echo '<div class="clear" style="clear:left"></div>';
- }
- ?>
- <?php endwhile; else: ?>
- <p><?php _e("Sorry, no posts matched your criteria."); ?></p>
- <?php endif; ?>
- <div id="pagenav">
- <div class="prev"><p><?php previous_posts_link(); ?></p></div>
- <div class="next"><p><?php next_posts_link(); ?></p></div>
- </div>
- </div>
- </div>
- </div>
- <!-- The main column ends -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement