Change Google AdSense Code On WordPress Theme

Using a Google AdSense ready or any “ads” ready WordPress theme can be an easy way to get a decent theme for your WordPress blog or site. But to use one you need to know how to change the AdSense code on the theme to your own. Unless you want to generate AdSense cash for the themes author!

Changing the AdSense code on a WordPress theme is actually very easy to do if you know where to look for it in the theme files. After you activate the theme on your WordPress blog, look at the front side of the blog to see all the different places the AdSense is showing. Not only check the main or front page of the blog but open an individual post, a page, an archive page, and a category page too. Take note of all the different places the AdSense is showing. The typical places are in the header, sidebar, within the content area of the posts on the main blog loop and individual single posts and possibly even in the footer.

Now that you know where to look go to the theme editor in the WordPress dashboard. Depending on the version of WordPress you are using, this is either the Presentation, Design or Appearance menu. Or what ever name they give it in the next upcoming version! Once in the theme editor look for the files to edit on the right side that are showing AdSense on your particular theme. Click on the file to edit on the right to open the file in the theme editor. Scroll down the file to find the AdSense code that should look like this:

<script type=”text/javascript”><!–
google_ad_client = “pub-1236912698310854″;
google_ad_slot = “3328948358″;
google_ad_width = 728;
google_ad_height = 15;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>

Now simply change the publishers number to your own, scroll down and click Update File. You should check every file in the theme editor just to make sure you haven’t missed any.

Similar Posts:



Tags: ,

If you liked this post, feel free to leave a comment that is relevant to the post or subscribe to the feed and get future articles delivered to your feed reader.

Sorry but due to the spamming of a few all comments are moderated and will appear when approved and all drive-by comments will be deleted!

Comments

Nice tips, i’ll try … !!

Reply

OK now I know, thanks a million.
Regards,
Cheryl Beckham

Reply

thanks for the tip! wordpress bloggers should not forget about this one.. or else, they are just going to give some $$$ to the pub id’s owner..

Reply

“Watch The Day The Earth Stood Still Online” ??

I know I encourage to use your keywords or site name to get backlinks but that is wild one! Oh well I’ll let it stay and good luck with the site!

Reply

Steven @ Best Online Casinos  Replied:

LOL. I once built links for a key phrase that had 9 words.

Ontoipic: Try using chikta instead of adsense for blogs, you won’t get priced and they pay you via paypal.

Reply

nice info thanks guys

Reply

niche tips ;)

Reply

good article,new knowledge for me..many thanks

Reply

Thanks. I made the change on my blogs.

Reply

Gotta test it out on my own, I was just about to change the theme, the Adsense needs some fit there :)

Reply

Thanks for sharing!!!

regards,
Anime

Reply

Does it mean that we shouldn’t use different plugins available for Google adsense? I have one plugin and it works for all, whatever theme you go with. One problem is to change colors of ads to optimize it for that specific theme. I like your tips though to change codes in files individually.

Reply

Alan I am not saying what to do with your blog that’s up to you. But what if a plugin is no longer supported or stops working?

I recommend or prefer as few plugins as possible but hey that’s just me.

Reply

Nice, I wonder how much authors make from people who dont change the adsense code.

Reply

I’ll have a go, my coding skills are terrible though :(

Reply

Even though this seems evident to me, i must admit it must be quite frequent for blog owners to forget to change the adsense link…I personnaly always make sure its fine :)

Reply

you guys rock!!!

Reply

Great article, I learn something more from your site.
thanks a lot.

Reply

Google AdSense is a fast and easy way for website publishers of all sizes to display relevant Google ads on their website’s content pages and earn money. Because the ads are related to what your visitors are looking for on your site

Reply

Thanks for sharing the tip. I have read some snippet somewhere that we can hide ads for different groups of visitors and this can be done via some plugin. I lost the link but do you have any idea to do that?

Reply

we can change the parameter within the script but is this against google TOS?

Reply

Jeff  Replied:

I am now a Google legal expert? Read the TOS and decide for yourself.

Reply

I think it’s not a good idea to change the code. You can easily to get banned if google know.

Reply

i am really very thankful that Google launched the Adsense program. this enables most of us who owns several websites to work at home.

Reply

can i change the length and the width of the code that Google gave me ? please email mew with an answer

Reply

Jeff  Replied:

Seriously?
‘email you the answer’!?
Cmon’ man.

The size (among other things) of the Google ads are done when you generate the code from Google. It has nothing to do with WP.

Reply

I think he haven’t yet experienced having an ad in google that’s why hes saying that, but I think from my experience organic ranking in the serps are better source of traffic because 80% of the time searchers wouldn’t want to click those ads that google give.

Reply

A million thanks! Google AdSense is a fast and easy way for website publishers.

Reply

Leave a comment
Drive-By comments will be deleted! Like "Thanks for sharing", "Nice post", or any other text that doesn't contribute to the discussion. If you ask a very specific question about your particular WordPress theme, it will probably be deleted. I can fix your WordPress site but for a price. If you ask a question like "Why don't my blog work right", it will be deleted. If you ask a question about your WordPress site without a leaving a link to it, it will be deleted. The point is to ask questions and or comment on the the actual content of the post, and to please use some common sense. All comments are moderated and will appear when approved. Thank you.

(required)

(required)