Skip to content

Instantly share code, notes, and snippets.

@DavidPeralvarez

DavidPeralvarez/front-page.php Secret

Created Jan 12, 2020
Embed
What would you like to do?
<?php
/**
* Custom front page template
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'genesis_sample_do_loop' );
function genesis_sample_do_loop(){
genesis_grid_loop( array(
'features' => 2,
'feature_image_size' => 'featured-image',
'feature_image_class' => 'alignleft post-image',
'feature_content_limit' => 200,
'grid_image_size' => 'grid-thumbnail',
'grid_image_class' => 'aligncenter post-image',
'grid_content_limit' => 200,
'more' => __('(More information...)', 'genesis-sample')
) );
}
<?php
// Add grid image sizes
add_image_size( 'grid-thumbnail', 200, 100, TRUE );
/* # Grid Loop
---------------------------------------------------------------------------------------------------- */
.genesis-grid{
padding: 20px;
margin: 0 0 20px;
width: 48%;
}
.genesis-grid-even{
float: right;
}
.genesis-grid-odd{
clear: both;
float: left;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.