Skip to content

Instantly share code, notes, and snippets.

@kalbers
Created April 5, 2012 17:29
Show Gist options
  • Save kalbers/2312703 to your computer and use it in GitHub Desktop.
Save kalbers/2312703 to your computer and use it in GitHub Desktop.
<div class="posts grid8 alpha">
<h2 class="section-title">Recent Posts</h2>
<?php
if ( get_query_var('paged') ) {
$paged = get_query_var('paged');
} elseif ( get_query_var('page') ) {
$paged = get_query_var('page');
} else {
$paged = 1;
}
?>
<?php $args = array( 'cat' => '-592, -614', 'post_status' => 'publish', 'paged' => $paged); ?>
<?php $query = new WP_Query($args); ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php get_template_part( 'content-results'); ?>
<?php endwhile; ?>
<?php wp_pagenavi(); // Use PageNavi ?>
<?php wp_reset_postdata(); ?>
</div><!-- .posts -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment