How to Input Google Adsense Ads Inside Your Wordpress Posts

2 comments
Embedding adsense advertisements in between the content helps to get high CPC adsense ads as well as good Adsense CTR. There were many wordpress plugins that perform this task easily, but doing so might eventually increases your wordpress blog's loading time.

And so, its better to manually perform this task as you can insert adsense ads anywhere inside your wordpress using just a shortcode.

Follow These Steps to put Google Adsense Ads Inside Your Wordpress Posts
  1. Go to Dashboard > Appearance > Editor
  2. Open functions.php file
  3. Insert the following piece of code anywhere in the functions.php file
    function showads() {
    return '<script type="text/javascript"><!--
    google_ad_client = "pub-1234567891011122";
    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');

  4. Save changes.
And now, whenever you write a new blog post, switch to HTML mode and insert the following tag at the position where you'd like to display your Google Adsense ad.
Note: Don't forget to replace the above adsense code highlighted in red with your own high performing adsense format.
Don't Forget To Share guys..:)
Next PostNewer Post Previous PostOlder Post Home

2 comments