Skip to content

Instantly share code, notes, and snippets.

@Temmyhlee
Forked from billerickson/functions.php
Created July 30, 2016 22:51
Show Gist options
  • Save Temmyhlee/a6cd84da7474eecff3dd68e7649b84b2 to your computer and use it in GitHub Desktop.
Save Temmyhlee/a6cd84da7474eecff3dd68e7649b84b2 to your computer and use it in GitHub Desktop.
<?php
/**
* Archive Grid Divider
*
*/
function be_grid_divider() {
// only run on blog home and archives
if( !( is_home() || is_archive() ) )
return;
if( in_array( 'one-half', get_post_class() ) && !in_array( 'first', get_post_class() ) )
echo '<div class="grid-divider"></div>';
}
add_action( 'genesis_after_post', 'be_grid_divider' );
.grid-divider {
overflow:hidden;
width: 100%;
border-top: 1px solid #ccc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment