First, you have to add the following code to your function.php file. Don’t forget to change the adsense PUB(client) id in the Code.
function showads() {
return ‘<script type=”text/javascript”><!–
google_ad_client = “pub-XXXXXXXXXXXXXXXX”;
google_ad_slot = “4668915978″;
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’, ’showads’);
Once you saved the functions.php file, you’re now able to embed your adsense code on your posts and display it exactly where you want. To do so, simply paste the following code on the editor, in html mode:
[adsense]
Popularity: 19% [?]







Leave a comment