dinzan
Member
Posted 10 months ago #
How to put ads along with posts ? I tried the adsense manager plugin and I didn't like it..
So far, I tried editing the single post.php file and ads come, but I want to blend them with the post, that is show like when we put an image.. text moves to the right side or left side of the ads...if u understand what I mean
dinzan
Member
Posted 10 months ago #
Example page ... I have a small box of ad here.. but the ad comes first, then the content.. I want to show the ads on the right side of the content.. like we align an image..
http://dinsan.info/2008/01/15/do-you-use-yahoo-mail/
That should be simple to do.
Put the ad code in a div and give this div a class, let's say "adsense_singleview_right"
Then in your style.css,
.adsense_singleview_right {
float: right;
display: block;
margin-left: 10px;
margin-bottom: 5px;
}
dinzan
Member
Posted 10 months ago #
Hi,
thanks for the reply..
I added following to style.css
adsense_singleview_right {
float: right;
display: block;
margin-left: 10px;
margin-bottom: 5px;
and following to the single.php
div id="adsense_singleview_right">
<script type="text/javascript"><!-- ... ( adsense code continues )
and no luck :(
I tried this on my localhost and it worked just fine.
Make sure you paste the adsense div immediately below:
<p class="post_author">by <?php the_author(); ?></p>
in single.php
dinzan
Member
Posted 10 months ago #
can you show me the entire code.. so that I can try copy pasting ?
dinzan
Member
Posted 10 months ago #
dinzan
Member
Posted 10 months ago #
thank you....... that worked :)