I'm number one in Google

I'm number one in Google for the keyword "Make Money Online."

Gurus are craving for this rank because of the laser targeted traffic, and I'm having a big sale of advertising starting from $55.

Spots are limited, grab your space now!

Grab The Kidblogger's Master Plan The Kidblogger's Master Plan Just enter your first name and valid email address below, then click the
"Yes! Give me my report" button to get the report for free.
:
:

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

under Ask Carl
By Carl on May 28, 2007

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!

Related Posts

5 Comments →

Comment by Peter
2007-10-12 14:12:20

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

 
Comment by OnlineMoney
2007-11-07 15:40:19

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

 
Comment by Jen
2007-12-04 00:20:01

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!

 
Comment by Mindy
2008-04-19 08:20:54

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

 
Comment by Mary@GoodlifeZen
2008-08-06 07:14:40

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?

 
Name
E-mail
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.