View Single Post
  #1 (permalink)  
Old 02-19-2005, 07:44 PM
PaulV PaulV is offline
Junior Member
 
Join Date: Feb 2005
Posts: 9
Default Adding Google Adsense to A Wordpress Blog

Adding Google Adsense to Wordpress

This is what it looks like
http://somethin-tropical.epaulv.com

Open index.php (you will find it in the root directory of where you installed your wordpress blog. eg yourdomain/wordpress/yourblog or yourdomain/yourblog)

Scroll down a bit and find the following - this will be slightly different depending on what skin you are using:
Code:
<body>

<div id="rap">
<div id="masthead">
<h1 id="header"><?php bloginfo('name'); ?></h1>
</div>
<div id="hmenu">
<div id="hnav">
</div>
</div>

<div id="googleplague">

<center><script type="text/javascript"><!--
google_ad_client = "pub-xxxx009818xxxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_ad_type = "text_image";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "FF3300";
google_color_url = "FF6600";
google_color_text = "666666";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>

</div>

<div id="content">
The idea is to have it placed in the center just under your header (the top banner on your page) You will find on your index.php where the script places your header eg - (in above) <div id="rap">
<div id="masthead"><h1 id="header"><?php bloginfo('name'); ?></h1></div> --- Then Google ----

In the above I have placed the Google Plague in a <div> tag. This just keeps it where it is supposed to be and helps you control elements of it without affecting the rest of the page, like centering and the like. eg - (in above) <div id="googleplague">
<center> ----google script ---- be sure to close it with the </center></div>

The <div id="googleplague"> you can name what ever you like. I just use a name so I can find different stuff by name when searching through a mountain of php...

I hope this is not too confusing. I always hate it when reading scripters writting instructions .... thank goodness I am a crayfish farmer and not a scripter. lmao No offence to the scripters...

cheers
Paul V
Reply With Quote