Created
January 4, 2013 05:50
-
-
Save kraftbj/4450241 to your computer and use it in GitHub Desktop.
Custom grid loop in Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'bk_grid_loop' ); | |
function bk_grid_loop() { | |
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(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment