Skip to content

Instantly share code, notes, and snippets.

View gregrickaby's full-sized avatar
:octocat:

Greg Rickaby gregrickaby

:octocat:
View GitHub Profile
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@gregrickaby
gregrickaby / home.php
Created June 3, 2012 04:02 — forked from jtsternberg/home.php
Genesis Custom Loop w/ Featured Image and Odd/Even support
<?php
$odd_or_even = 'even';
$args = array(
'cat' => 1,
'posts_per_page' => 2,
'order' => 'DESC'
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();