How to customize adsense display for Paid Post
Displaying adsense inside post or in between title and post content is a very common thing in most of the blogs. And if you write paid post, then the sponsors would not like to display any ads in between in the sponsored post. And to overcome this you can do the following steps
1. Create a separate category for all the review post or sponsored post e.g;- Reviews
2. Make a the following code in your wordpress blog to exclude adsense display for the review posts. in the Main Index Template or index.php
<?php if (! in_category(26)) { ?>
<script type=”text/javascript”><!–
Adsense Code
</script>
<?php }?>
where 26 is the category id for Reviews category.
3. Save index.php
4. Create the sponsored post with category for the post as Reviews.
This should help for blogger’s who want to display ads for posts other than Sponsored Post.
Comments
Leave a Reply