Skip to content

Instantly share code, notes, and snippets.

@mbrughi
Created December 2, 2017 08:35
Show Gist options
  • Save mbrughi/2bab259b013177dd6c73b35ecc70ea29 to your computer and use it in GitHub Desktop.
Save mbrughi/2bab259b013177dd6c73b35ecc70ea29 to your computer and use it in GitHub Desktop.
Genesis Grid Loop 1 feat 2 col
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_grid_loop_helper', 55 );
/** Add support for Genesis Grid Loop **/
function child_grid_loop_helper() {
if ( function_exists( 'genesis_grid_loop' ) ) {
genesis_grid_loop( array(
'features' => 1,
'feature_image_size' => 250,
'feature_image_class' => 'alignleft post-image',
'feature_content_limit' => 1000,
'grid_image_size' => 'grid',
'grid_image_class' => 'alignleft post-image',
'grid_content_limit' => 220,
'more' => __( 'Continue reading...', 'genesis' ),
'posts_per_page' => 6,
) );
}
else {
genesis_standard_loop();
}
}
genesis()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment