Hello,
I got a violation report from Google for my ad because one of the pages it loads on doesn’t have any valuable content (the login/register page).
Is it possible to add the code to specific pages only ie. Login/Register page?
Can I add something here?
add_action( 'wp_head', 'add_head_script' );
function add_head_script()
This is the code I’m using:
// Google Adsense
add_action( 'wp_head', 'add_head_script' );
function add_head_script(){
?>
<div class="leaderboard" align="center">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Sugarfree Gallery Main Page -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-XXXXXXXXXX"
data-ad-slot="XXXXXXXXXX"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<?php
}
Thank you!