AdSense at the Top of WordPress Blog Home Page

Many do not know that you may put AdSense ads javascript code to the top of your WordPress blog home page and also at the top of your WordPress blog Category pages. It involves some modification of your blog theme files, but it is not too difficult. Here is what you do:

  1. In your Admin Dashboard, choose Editor and then then the Main Index Template (index.php) file, as shown below.
  2. Create your Google AdSense code. I would recommend a 468 wide by 60 high text-only ad. Match your blog colors as well as possible. Note that in the screen shot below, the code   is used to insert extra spaces so the ad aligns correctly. Remember to click on Update File!
  3. You can repeat this procedure to show an ad at the top of each Category Page. Choose the Archives.php file and edit in a similar manner, as shown below.

And here is the finished result on the home page!


Artisteer Template Creator
I have switched all of my sites to hostgator hosting from the other 4 hosts I tried. Better price, better service, & virtually no down time.
Hostgator Value Hosting - Click Here! Use Coupon FREEBLOG25 For 25% Off!

  • Share/Bookmark

Need Help? Have Questions? Email Me!

{ 2 comments }

marvin July 12, 2010 at 2:15 am

how can I add adsense of topmost part of my blog, above the heading

Arjuna August 12, 2010 at 9:53 pm

thank you, this is good tips, specially for me newbie

Comments on this entry are closed.