Created
November 20, 2012 13:39
-
-
Save WebEndevSnippets/4117986 to your computer and use it in GitHub Desktop.
Genesis: Ad after third post's content
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
add_action( 'genesis_after_post_content', 'we_category_ad' ); | |
/** | |
* Ad after third post's content | |
* | |
*/ | |
function we_category_ad() { | |
global $wp_query; | |
if( 2 == $wp_query->current_post ) | |
echo '<div class="ad">Ad Goes Here</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment