Yes, I did it. But I’m looking for a plugin, for example for to use adsense.
you could use shortcode;
in functions.php, add something like, for instance to show adsense:
function show_ads() {
return '<div class="adsense">
<!-- start of ad code -->
<script type="text/javascript"><!--
google_ad_client = "pub-1234567890";
/* my_adsense */
google_ad_slot = "123456789";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- end of ad code -->
</div>';
}
add_shortcode('adsense', 'show_ads');
and in style.css, you could use .adsense { ..... }
to format the adsense area.
and in the few posts, enter [adsense]
into the text of the post, on its own line, where you want to show the ad.
Thank you!! that code works fine!!
But, is there a way to add “adsense” in my post as a comment, instead of use the brackets?
ad the codes to your comments.php file instead of functions.php