groups

name language licence
Optimal ad display PHP BSD
HTML 4.01 Transitional HTML Other
Tweet This PHP BSD
Untitled Snippet PHP Other
Untitled Snippet PHP Other
twitter badge PHP Other
Display a Pages SubMenu in your Sidebar PHP BSD
comments-popup PHP GPL 2

< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 >



language: PHP
licence: BSD

Optimal ad display

options: view full snippetsend to code collector
//This will place your ad block inside your first blog post. AdSense’s heatmap shows the area within the content to be an optimal area for the display of ads. I found this solution in the WordPress forum.

//Place:
<?php $showAdSense = True; ?> 

//before the line:
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> 

//Then insert this into the part where you want the ad to appear.
<?If ($showAdSense) { ?><div style="float:right;padding:3px;"> Ad sense code here </div><?php $showAdSense = False;} ?>

	
(Continues...)