Skip to content

Instantly share code, notes, and snippets.

@kalbers
Created April 5, 2012 17:14
Show Gist options
  • Save kalbers/2312592 to your computer and use it in GitHub Desktop.
Save kalbers/2312592 to your computer and use it in GitHub Desktop.
<?php $args = array( 'posts_per_page' => '10', 'cat' => '-592, -614', 'post_status' => 'publish', 'paged=' . get_query_var( 'page' )); ?>
<?php $query = new WP_Query($args); ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<?php get_template_part( 'content-results'); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
<?php wp_pagenavi(); // Use PageNavi ?>
<?php } else { // Otherwise, use traditional Navigation ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo;') ?></div>
<div class="alignright"><?php previous_posts_link('&raquo;') ?></div>
</div>
<?php } // End if-else statement ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment