-
-
Save ahmadawais/83bea634bf8699bc9489 to your computer and use it in GitHub Desktop.
Adsense Shortcode
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
<?php | |
/** | |
* Adsense ad shortcode. | |
* | |
* Wrtie [adsense] in your post editor to render this shortcode. | |
* | |
* @package aa_basic_shortcodes | |
* @since 1.0.0 | |
*/ | |
function aa_adsense_shortcode() { | |
return '<script type="text/javascript"><!-- | |
google_ad_client = "pub-********"; | |
google_ad_slot = "********"; | |
google_ad_width = 468; | |
google_ad_height = 60; | |
//--> | |
</script> | |
<script type="text/javascript" | |
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> | |
</script> | |
'; | |
} | |
add_shortcode('adsense', 'aa_adsense_shortcode'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment