Adsense into Header
-
Hi
I am trying to put adsense (horizontal banner) into the top right of my header.
The theme I am using is Andyblue. There is already a search bar there, I would like to replace this with adsense.
I am tried a number of different variations of my limited code knowledge and can’t get any of them to work. Any help would be greatly appreciated.
The header code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en"> <head> <?php if ( is_home() ) : ?><title><?php bloginfo('name'); ?></title><meta name="keywords" content="italiasw, italia sw, www.italiasw.com, recensioni, web2, web 2, apps, applicativi, software, windows, windows xp, windows vista, vista, ict, recensioni ict, recensioni software, news, news high tech, blog italia, blog software, italia software, sw, blog informatica, news informatica, articoli informatica, recensioni web 2.0" /><meta name="description" content="<?php bloginfo('description'); ?>" /> <?php endif ;?><?php if ( is_single()) { ?><title><?php the_title(); ?> ? <?php bloginfo('name'); ?></title><?php } ?> <?php if ( is_search()) { ?><title>Search Result</title><?php } ?><?php if ( is_archive()) { ?><title><?php single_cat_title(); ?> ? <?php bloginfo('name'); ?></title><?php } ?> <?php if ( is_page()) { ?><title><?php the_title(); ?> ? <?php bloginfo('name'); ?></title><?php } ?><?php if ( is_404()) { ?><title>Error 404, Page not Found ? <?php bloginfo('name'); ?></title><?php } ?> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="imagetoolbar" content="no" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="description" content="" /> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script src="<?php bloginfo('template_directory'); ?>/js/calculations2.js" type="text/javascript"></script> <?php wp_head(); ?> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-33789199-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'https://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></head> <body> <div id="header"> <h1><a></a><a>/"><?php bloginfo('name'); ?></a></h1> <h2><?php bloginfo('description'); ?></h2> <?php include (TEMPLATEPATH . '/searchform.php'); ?></div> <div <script type="text/javascript"><!-- google_ad_client = "ca-pub-1236697108641913"; /* THOC Header */ google_ad_slot = "2441790312"; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div>
Thanks for your help.
Sam
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Adsense into Header’ is closed to new replies.