Skip to content

Instantly share code, notes, and snippets.

@kheniparth
Last active August 29, 2015 14:05
Show Gist options
  • Save kheniparth/b4f6ebce655958b1b57f to your computer and use it in GitHub Desktop.
Save kheniparth/b4f6ebce655958b1b57f to your computer and use it in GitHub Desktop.
Change the grid loop parameters in this code to edit the genesis grid loop.
<?php
/**
* Set up the Grid Loop
* @author Bill Erickson
* @link http://www.billerickson.net/genesis-grid-loop-content/
*
*/
function child_grid_loop_helper() {
genesis_grid_loop( array(
'features' => 2,
'feature_image_size' => 'child_full',
'feature_image_class' => 'aligncenter post-image',
'feature_content_limit' => 0,
'grid_image_size' => 0,
'grid_content_limit' => 0,
'more' => __( '[Continue reading...]', 'genesis' ),
'posts_per_page' => 10,
) );
}
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_grid_loop_helper' );
genesis();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment