Skip to content

Instantly share code, notes, and snippets.

@Temmyhlee
Created July 30, 2016 22:23
Show Gist options
  • Save Temmyhlee/cf12d9fd0a8d93e5aafeb54f61f9beb9 to your computer and use it in GitHub Desktop.
Save Temmyhlee/cf12d9fd0a8d93e5aafeb54f61f9beb9 to your computer and use it in GitHub Desktop.
/**
* Project Divider
*Adds divider after 4 posts in genesis divider
*/
function be_project_divider() {
global $wp_query;
$count = $wp_query->current_post + 1;
if( 0 == $count % 4 && $count !== $wp_query->post_count )
echo '<div class="divider"></div>';
}
add_action( 'genesis_after_post', 'be_project_divider' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment