Skip to content

Instantly share code, notes, and snippets.

View kalbers's full-sized avatar

Ken kalbers

  • Center for History and New Media
  • Fairfax, VA
View GitHub Profile
<?php $args = array( 'posts_per_page' => '10', 'cat' => '-592, -614', 'post_status' => 'publish', 'paged=' . get_query_var( 'page' )); ?>
<?php query_posts($args) ?>
<?php while ( have_posts() ) : 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 $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 ?>
<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 {
$temp = $wp_query; // assign orginal query to temp variable for later use
global $wp_query;
global $post;
} ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
<?php $args = array( 'cat' => '-592, -614', 'post_status' => 'publish', 'paged' => $paged); ?>
<?php $wp_query = new WP_Query($args); ?>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
<?php get_template_part( 'content-results'); ?>
Title URL
Google <a href=”http://google.com”>URL</a>