Google Adsense is considered best medium to monetize online content. Lot of webmasters use Google Adsense advertisements on their websites, blogs to earn and make living. Due to strict Adsense requirements, you may want to disable display of ads on specific posts containing sensitive content. You can easily implement this by following method and prevent Google Adsense ads from showing on specific posts.
Code to block Adsense ads on specific WordPress posts
1. Add the first part of the code to header.php file of your WordPress blog. For Genesis users, you can goto Genesis > Theme Settings and paste this in header script area. After you paste the code, make sure you change post IDs in the code or add more post IDs (like 82959, 82960 in the code).
2. Then paste the second part of the code to place where you want to display adsense ads. If you want to display on the sidebar, then drag text widget to specific sidebar and paste the code. For manually displaying on each post content area, paste it in single.php file at appropriate area.
Genesis users can paste in sidebar widget area. To display this in content area, use Simple Hooks plugin and paste in the hook area where you want to display ads.
You can disable Google Adsense ads on specific posts, by adding post IDs in code as shown in step 1 above. Quick and easy way to prevent Adsense ads from showing up on specific posts on WordPress blog. Credit Sandip Dedhia