You would need to place your Adsense code in the sidebar.php file immediately after:
<?php endif; ?>
</ul>
This is not what Don is asking…I think? This will put the adsense block into the sidebar. How do you put adsense outside the blog itself. Like on the background.
I would like to post them in the vast empty space to the right of the Kubrick columns
Adding them to the bottom of the sidebar on the right would address this, yes?
OK then for my own wordpress site how would you put ads outside the wordpress theme?
basic html:
put another wrapper div around the whole thing, and then float the ‘old’ page a bit to the side, and float the new space to to the other side to take the ads 😉
PS: if you do it with the default theme, the relevant code changes look like:
header.php
</head>
<body <?php body_class(); ?>>
<div id="wrapper">
<div id="side_ads">
advertising code here
</div>
<div id="page">
style.css
#wrapper { margin: 0 auto; width: 940px; }
#side_ads { float:right; margin: 40px 10px; width:150px; height:500px; border: 2px solid green; background-color:#990033; }
#page {
background-color: white;
float:left;
border: 1px solid #959596;
text-align: left;
}
PPS don’t forget to close the new divs in the footer.php
<!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->
</p>
</div>
</div>
</div> <!-- closing #wrapper div -->
<!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/kubrick/ -->
<?php /* "Just what do you think you're doing Dave?" */ ?>
see it in action just for 24 hrs
alchymyth: Could you help me put another div wrapper around the whole thing on my blog, like you described? I tried it on default theme and it worked perfectly, it’s just like I want it.
But I’m not using default theme, I’m using Squared and the coding are totally different, I also have added alot of stuff in the header like ads and a menu so it was too hard for me to place the codes you posted.
My blog is: http://www.luksusdyret.com
As you can see I’ve made an right sidebar, but I’m not happy with that and I think this seloution would be better for me.
I would be so thankful if you would help me.
Here is my header.php code now;
<!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" xml:lang="en" lang="en">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head>
<body>
<div id="principal">
<div id="headerbilde"><a href="http://www.luksusdyret.com"><img src="http://www.luksusdyret.com/wp-content/uploads/2010/04/HEADER.png"></a>
</div>
<div id="menyboks" class="meny">
<ul>
<li><a href="http://www.luksusdyret.com">Forsiden</a></li>
<li><a href="http://www.luksusdyret.com/kontakt">Kontakt</a></li>
<li><a href="http://www.luksusdyret.com/media">Media</a></li>
<li><a href="http://luksusdyret.com/salgsblogg">Salgsblogg</a></li>
<li><a href="http://www.luksusdyret.com/VIP">VIPblogg</a></li>
</ul>
</div>
<p>
annonse:
<a href="http://tracking1.euroads.no/system/showadv.php?sid=3&cpid=733&adid=16408&acid=2266&eatrackid=2853"><img src="http://banner.euroads.no/banner/3/733/banner_5244.gif" width="830"></a>
<p>
put the begin of the div #wrapper between <body> and <div id="principal">:
(and also the div for the extra-thematic content)
<body>
<div id="wrapper" style="width:1000px;margin:0 auto;">
<div id="extra" style="width:150px; height:2000px; background:green;float:left;">ads</div>
<div id="principal" style="float:right">
shown with inline styles;
adjust the number values.
you could put the new styles into style.css.
and add a new </div> after the last </div> in footer.php.
thank you thank you soo much! Finaly I got what I needed 😀