This is an early WordPress snippet we included on Internoetics. We recommend you visit our AdSense Plugin for a more robust solution.
1
<?php
2
/*
3
AdSense Shortcode
4
http://www.beliefmedia.com/code/wp-snippets/adsense-shortcode
5
*/
6
7
function beliefmedia_display_adsense() {
8
return '
9
<p align="center"><script type="text/javascript"><!--
10
google_ad_client = "pub-4628247728391656";
11
/* Internoetics_468x60 */
12
google_ad_slot = "7478088496";
13
google_ad_width = 468;
14
google_ad_height = 60;
15
//-->
16
</script>
17
<script type="text/javascript"
18
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
19
</script>';
20
}
21
Usage is with [adsense]
. Create as many shortcodes as necessary to support each instance of an ad block... a messy solution. Again, check out our plugin.