Skip to content

Instantly share code, notes, and snippets.

@cdils
Created October 21, 2013 22:48
Show Gist options
  • Save cdils/7092209 to your computer and use it in GitHub Desktop.
Save cdils/7092209 to your computer and use it in GitHub Desktop.
To use grid loop on a page instead of the standard Genesis loop.
//* Remove entry meta in entry footer and Genesis loop
remove_action( 'genesis_loop', 'genesis_do_loop' );
//* Add Genesis grid loop
add_action( 'genesis_loop', 'my_grid_loop_helper' );
//* Genesis grid loop
function my_grid_loop_helper() {
if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 0,
'feature_image_size' => 0,
'feature_content_limit' => 0,
'grid_image_size' => 0,
'grid_content_limit' => 250,
'more' => __( '[Read more]', 'theme-prefix' ),
) );
} else {
genesis_standard_loop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment