•  
  • Grab The Master Plan

    The Kidblogger's Master Plan Enter your name and email below, then click the "Free Instant Access!" button to get the free report.
  •  

AskCarl: How to Add AdSense to a WordPress blog? In Various Situations

By Carl On May 28, 2007 Under Ask Carl

John e-mailed me a while ago asking me on how did I place AdSense to my WordPress blog. Too bad John didn’t have a site to show me. Anyway I’ll post here my tutorial on how to add Adsense into a WP blog.

Adding AdSense After Post Titles

Let’s go on the basics first. For example: You want to add a 336 x 280 AdSense block below you post title. Open your index.php then look for the part that looks like this:

Adsense
And if you want to wrap that block, like most blogs do. Add a div into the Adsense code that may look like the one below:

How to Add AdSense to A WordPress Blog

Just adjust the margin that suits your blog design best and of course you could also change the float to “left” or “right”.

Some have situations adding an AdSense unit on their first post but not on the second (I used to do this before ) to do that, open your index.php then look for something like this:

How to Add AdSense to A WordPress Blog

We’re not done yet! Look for this on your index.php:

How to Add AdSense to A WordPress Blog

Then place this on the part that says “****Your Adsense Code goes here****“

How to Add AdSense to A WordPress Blog

See, piece of cake ;) Special thanks to tamba2 for the code.

Adding AdSense After Every Entry

If you want to place an Adsense block every after your entry ( Like what I have — for now :P ) You will need to open your index.php then look for this part:

How to Add AdSense to A WordPress Blog

And if you want, you can also add a center tag to make it look more decent.

Adding AdSense to Single Posts

If you want AdSense only in your single posts. Open your single.php then look for something like this:

How to Add AdSense to A WordPress Blog

Actually it’s the same as Adding AdSense After Post Titles (Above) :D

Adding AdSense Before your Header

Lastly, if you want to add an AdSense unit before your header (Like b5media blogs, etc.)

Open your header.php and look for a code like the one below:

How to Add AdSense to A WordPress Blog

Easy!

But still if it’s that hard for you to integrate AdSense units to your WordPress blog, there’s always a plugins to the help.

If you have any comments or want to add or suggest something. Don’t be shy to leave me a comment ;)

Have any questions? Don’t want to waste time searching Google? just drop me a mail and I’ll try my best to answer your question!

Bookmark

Related Posts

  • No Related Posts

15 Comments Add yours

  1. Peter
    October 12, 2007
    2:12 pm #comment-1

    Hi Carl.

    I am just set up one wordpress at my host. I open index.php it ‘s empty inside…Where I can looking for index.php…I am newbie..Thank

    Peter

  2. OnlineMoney
    November 7, 2007
    3:40 pm #comment-2

    Carl, you are cool.. lol. I use blogger.

  3. Jen
    December 4, 2007
    12:20 am #comment-3

    Thanks Carl….just what I was searching for! I couldn’t believe when I scrolled down and found out you are 13 or 14…God Bless You! You will surely succeed in life! Thanks again!

  4. Mindy
    April 19, 2008
    8:20 am #comment-4

    I have created a google blogger but when I try to add the adsense code into my blogger, it gave me an error message. I try it many time but I just get the same error message. HELP! I’m new with this internet thing and am in need of someone who know what they’re doing. It would be nice to have my blogger up and running. Can you help me? Thanks

  5. Mary@GoodlifeZen
    August 6, 2008
    7:14 am #comment-5

    Hi Carl,
    I’m trying to put an adsense vertical widget in my sidebar. I’ve copied the code into a ‘text’ unit in my sidebar but it’s not showing….sob.

    What should I do?

  6. ArticleAlley
    August 27, 2008
    9:08 pm #comment-6

    Thanks Carl. Don’t forget adding the code is the first step, to get the most out of monetizing a blog you need to think about other factors – blending in the colours to match you own colour scheme – the site of the ads – using link units etc. There is a whole world to this area but adding the code is a great start!

  7. section 36
    September 24, 2008
    8:25 am #comment-7

    we are super proud of you carl niels ocab.com! kidblogger. KEEP BLOGGING :D

  8. michael k
    April 3, 2009
    9:35 am #comment-8

    wow you made it so simple.

    but im still finding it hard, maybe i have different version of wordpress. >.<

  9. Weight Loss
    April 21, 2009
    6:47 am #comment-9

    How I can add adsense advertisements after the header?!

    Thank you.

  10. indegeSip
    May 28, 2009
    8:49 am #comment-10

    I watch this guy for year, yea he do a lot of crazy stuff, but I know he is a really good and nice person. My boyfriend got his all best fights and we probably going to pray today and watch his in ring – so sad love you Mike.

  11. HerBeriaWed
    July 7, 2009
    2:19 am #comment-11

    It is a lot of talking about M. Jacksondead, it’s a very sasd for me because I love his music, I still didn’t believe in his dead. Hi was a definitely King of music

  12. BloggerSum
    November 26, 2009
    11:21 pm #comment-12

    This is just what I have been looking for – to add 336 x 280 AdSense block below my blog post title/s.

    I will try it. I just hope it works.

    Much thanks for this tip.

    Faith @Bloggersum

  13. Andy
    April 18, 2010
    10:11 pm #comment-13

    do you think inove theme is adsense optimized?

  14. Carol
    July 5, 2010
    3:27 pm #comment-14

    Thanks very much for another marvellous post. I am always looking for good WordPress tips to recommend to my readers. Thank you for writing this post. It’s exactly what I was looking for. Truly first-class post.

  15. Charles
    July 25, 2010
    10:08 am #comment-15

    Hello admine
    great post. i have read and learn from your site…but you can still find morn info on my site too….http://onlineuniqueclicks.com/

Add a comment

  • Avatars are handled by Gravatar
  • Comments are being moderated