Created
November 17, 2015 01:04
-
-
Save chillybin/374ad3d649c515c6cec7 to your computer and use it in GitHub Desktop.
Add Advertisement after 1st post in Genesis
This file contains hidden or 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', 'ad_after_first_post'); | |
function ad_after_first_post() { | |
global $wp_query; | |
if( !is_singular && 0 == $wp_query->current_post ) { ?> | |
<div id='div-gpt-ad-1442795039305-2'> | |
<script type='text/javascript'> | |
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1442795039305-2'); }); | |
</script> | |
</div> | |
<?php } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment