Are your ads showing properly? Have you implemented the PHP login and <div class="aicp"> like shown in the video and textual documentation?
Also, are you using any cache plugin, if so disable that.
but when i block ads with region use code ISO its work, ok im gonna try to disable cache plugin,but what it is cache plugin?
If it is working for a region based, then you have implemented the code correctly. Cache plugins like W3 Total Cache, WP Super Cache, WP Rocket, Cache Enabler etc.
i have same case on this thread https://ww.wp.xz.cn/support/topic/not-working-for-all-sites-2/ but i dont know how to fix it
Hello Sir,
Can you confirm me if the code is correct?
add_shortcode( ‘your_shortcode_name’, function() {
if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors
$adCode = ‘<div class=”aicp”><!– Don\’t forget to add this div with aicp class –>
My Own Google ads code here
</div><!– end of the aicp 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>’;
}
} );
@dreamgadgetspro yes its right but change your_shortcode_name to whatever shortcode name you want.
If I don’t want to use shortcode name then that ok? if ok then which part of code I need to remove ?
I am not a developer, thats why I am asking this type stupid question.
If you don’t wanna use shortcodes, try using ad inserter plugin. To know how to use Ad Inserter plugin, check out the video in plugin description and read this thread: https://ww.wp.xz.cn/support/topic/does-this-work-with-ad-inserter-plugin/