Twitter
RSS

How To Put Your Adsense Ads in Your Single Blogpost Automatically

For some people that have been advanced on php code and experienced on adsense ads may know this trick, but here I will try to write back a short trick to put your adsense ads automatically on the top of your article on single blogpost, so it will look in under your blogpost title.

This is simple trick for wordpress theme modification, where every article that you posted will automatically be attached to google adsense ads in under title. If you do not know anything about php code do not worry, tips and tricks below are very easy to follow and just doing step by step.

By modification your wordpress theme you no longer need to insert adsense code on each article one by one. Of course, this will save your time, besides of that the benefit from this trick is the ads that are appropriate under the title will be easily seen by your readers. Course will increase the CTR (click through rate) which will generate greater your adsense income.

Well now that I want to share, how to insert adsense on single post, it will not appear on the main page (home page) and in the archive pages (archive). The steps to insert your adsense into your single blogpost are:

  1. Please prepare the adsense ad code that you will paste, the best choice for adsense ads is Square (250 x 250) or if you have a large yard on your blog may select the Medium Rectangle (300 x 250).
  2. Login into your admin pages.
  3. Go to appearance and select the menu bar editor.
  4. Then you will see some php files from your theme that you are using, usually in your right side.
  5. Then select a single post (single.php) will appear on your screen a single file that you need to edit.
  6. Find the code tags <? php the_content. In each theme codes are sometimes different tags are usually like this <? Php the_content (Read more …);?> or it could be like this <? php the_content (‘(Read the rest of this entry …)’);?> core is to find the code <? php the_content
  7. Then add this code thereon:
  8. <div style=’display:block; float:left; padding-right:5px’>
    adsense code here
    </div>

    So the code would be:

    <div style=’display:block; float:left; padding-right:5px’>
    <script type=”text/javascript”><!–
    google_ad_client = “pub-****************”;
    /* 300×250, created 12/26/09 */
    google_ad_slot = “**********”;
    google_ad_width = 300;
    google_ad_height = 250;
    //–>
    </script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
    </script>
    </div>

    <div><?php the_content(‘(Read the rest of this entry…)’); ?></div>

  9. By placing the code above your adsense ads will be display on the left, while for display ads on the right replace the code float: left; with float: right;
  10. Then press update to save your work.

Well that’s all the simple tips may be useful to all for showing your adsense ads on single post. Without understanding the php code, but fortunately did not difficult to put some HTML based on the types of pages to insert adsense ads on single blogpost.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Quick Click Commissions



Leave a Reply

Security Code: