Skip to content

Instantly share code, notes, and snippets.

@varickdesign
varickdesign / Not Working Grid Loop
Created January 15, 2013 21:41
Code That Worked To Pull in Pages in WP using Grid Loop under Genesis 1.8. Can see it working here http://tinyurl.com/an2ny5j
add_action( 'genesis_before_loop', 'child_maybe_do_grid_loop' );
function child_maybe_do_grid_loop() {
// Amend this conditional to pick where this grid looping occurs
if ( is_page('2') ) {
remove_action('genesis_before_post_content', 'genesis_post_info');
@varickdesign
varickdesign / New WP Query For Grid
Created January 16, 2013 21:20
This is the new updated WP query for the grid using WP standard query
function staff_do_grid_loop() {
$args = array(
'post_type' => 'page',
'meta_key' => 'staff',
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => get_query_var( 'paged' ),
'posts_per_page'=> 3,
);
@varickdesign
varickdesign / working new grid with pagination in Genesis
Created January 17, 2013 16:36
Working New Grid with Pagination in Genesis
function staff_do_grid_loop() {
$args = array(
'post_type' => 'page',
'meta_key' => 'staff',
'posts_per_page'=> 4,
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => get_query_var( 'paged' ),
);