Ok, would I need to have a blank line between the separate shortcode instances, like this?
add_shortcode( ‘googlead1’, 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 –>
<div class=”aicp”><script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– Google ROS ATF Medrec –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:300px;height:250px”
data-ad-client=”ca-pub-12345689123456789″
data-ad-slot=”123456789″>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> */ }
</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>’;
}
} );
add_shortcode( ‘googlead2’, 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 –>
<script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– AdSense Responsive Ad Code –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-1234567890″
data-ad-slot=”0987654321″
data-ad-format=”auto”>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</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>’;
}
} );