Skip to content

Instantly share code, notes, and snippets.

@DavidPeralvarez
Created January 12, 2020 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidPeralvarez/efadd33bcbe948eb72a3671c100dea76 to your computer and use it in GitHub Desktop.
Save DavidPeralvarez/efadd33bcbe948eb72a3671c100dea76 to your computer and use it in GitHub Desktop.
<?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