1. Computing

How to Add Google AdSense Between Posts in Wordpress

By

1 of 3

Step 1 - Enter HTML Code to Identify Where the Google AdSense Ads Should Appear
Add AdSense Between Posts in Wordpress Step 1
© Automattic, Inc.

If you're using Wordpress.org and hosting your blog through a third party blog host, you can add Google AdSense ads to your blog and earn money.

To display Google AdSense ads (image ads or text ads) between your posts, log into your Wordpress dashboard, go into your theme editor screen (see the red circle on the left in the image above to find your editor screen), open the index.php file (see the red circle on the right in the image above to find your index.php file), and enter the code in the red circle in the center of the image above, which is:

<?php $count = 1; ?>

into your own editor screen directly above the code that says:

<php if (have _posts ()) : ?>.

You can change the number in the code from "1" (meaning the ad will appear beneath the first post on your blog) to any number you want in order to place the ad under the specific post on your blog where you want it to appear.

Warning: It's a good idea to copy the original code and paste it into Notepad or a similar text-editor program. That way, if something goes wrong, you can simply delete all of the code from Wordpress and replace it with your original code.

  1. About.com
  2. Computing
  3. Blogging
  4. Starting a Blog
  5. Wordpress Tutorials & Tips
  6. AdSense Between Posts - How to Add Google AdSense Ads Between Posts In Wordpress

©2014 About.com. All rights reserved.