How to wrap text around advertising block

I’ve been looking at my AuctionAds & Adsense advertisement placements on this blog, and wanted to see how I could improve the “blending”. I’ve seen a few sites where the blog entries wrap around the ad block, and wanted to do something similar. It turns out that the code is pretty simple!

In single.php (the file may be of a different name, depending on your theme… for example Redoable’s is single_post.php), find:

<?php the_content(); ?>

And add this above it:

<div style=”float:left;margin-right:10px”>
Your Adsense code goes here
</div>

Basically, you use a <div> block that “floats” (meaning that it allows text to wrap around it). You can change the float:left to float:right if you want it on the right side.

Comments
There are no comments just yet, why not be the first?
Leave a Comment
Add your picture!
Join MyBlogLog and upload your avatar. C'mon, it's free!