Adding Google adwords to default theme

To add Google adwords to your default theme, you will have to copy and paste the code that Google adwords gives you.  See the instructions below:

AdSense for Content -> Ad Unit -> Leaderboard -> I left this blank -> Choose a name -> Copy and paste the code given in the box and add the code to the section labeled: The google ads javascript will go here. Just cut and paste the code as is

Click on Appearance -> Editor -> (Header) header.php

Add the following code shown in bold to the header.php code snippet below.  This snippet is the top portion of the header.php code.

<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” <?php language_attributes(); ?>>

<head profile=”http://gmpg.org/xfn/11″>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

The google ads javascript will go here. Just cut and paste the code as is


<title><?php wp_title(‘&laquo;’, true, ‘right’); ?> <?php bloginfo(‘name’); ?></title>

<?php wp_title(‘«’, true, ‘right’); ?> <?php bloginfo(‘name’); ?>

If you want it below the title, you will have to put it near the bottom.  See below:

<div id=”header”>
<div id=”headerimg”>
<h1><a href=”<?php echo get_option(‘home’); ?>/”><?php bloginfo(‘name’); ?></a></h1>
<div class=”description”><?php bloginfo(‘description’); ?></div>
</div>
</div>
The google ads javascript will go here. Just cut and paste the code as is
<hr />

Leave a Reply