Lego2012
12/13/2016 - 9:22 AM

Template - Use the Genesis Grid Loop in front-page.php

Template - Use the Genesis Grid Loop in front-page.php

<?php
// Do NOT include the opening php tag

remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_grid_loop_helper' );
/** Add support for Genesis Grid Loop **/
function child_grid_loop_helper() {

	if ( function_exists( 'genesis_grid_loop' ) ) {
		remove_action( 'genesis_before_post_content', 'generate_post_image', 5 );
		genesis_grid_loop( array(
			'features'              => 2,
			'feature_image_size'    => 'large',
			'feature_image_class'   => 'aligncenter post-image',
			'feature_content_limit' => 0,
			'grid_image_size'       => 'grid',
			'grid_image_class'      => 'alignleft post-image',
			'grid_content_limit'    => 0,
			'more'                  => __( 'Continue reading...', 'genesis' ),
			'posts_per_page'        => 6,
		) );
	} else {
		genesis_standard_loop();
	}

}

genesis();