Created
July 30, 2016 22:23
-
-
Save Temmyhlee/cf12d9fd0a8d93e5aafeb54f61f9beb9 to your computer and use it in GitHub Desktop.
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
/** | |
* 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