Skip to content

Instantly share code, notes, and snippets.

@jeremyboggs
Forked from kalbers/gist:2312586
Created April 5, 2012 17:32
Show Gist options
  • Save jeremyboggs/2312722 to your computer and use it in GitHub Desktop.
Save jeremyboggs/2312722 to your computer and use it in GitHub Desktop.
<?php
$page = (get_query_var('page')) ? get_query_var('page') : 1;
$args = array(
'posts_per_page' => '10',
'cat' => '-592, -614',
'post_status' => 'publish',
'paged=' . $page
);
query_posts($args);
while ( have_posts() ) :
the_post();
get_template_part( 'content-results');
endwhile;
?>
<?php if(function_exists('wp_pagenavi')) : ?>
<?php wp_pagenavi(); ?>
<?php else: ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo;') ?></div>
<div class="alignright"><?php previous_posts_link('&raquo;') ?></div>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment