I put this in my function theme
add_shortcode( ‘testads’, function() {
if( aicp_can_see_ads() ) { //This part will show ads to your non-banned visitors
$adCode = ‘<div class=”aicp”>
<center><script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– 360cub 336 by 280 –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:336px;height:280px”
data-ad-client=”ca-pub-”
data-ad-slot=””>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></center>
</div>’;
return $adCode;
} else { // Anything within this part will be shown to your banned visitors or to the blocked country visitors
return ‘<div class=”error”>You have been blocked from seeing ads.</div>’;
}
} );
-
This reply was modified 7 years, 8 months ago by
jumbay.