- This topic has 9 replies, 3 voices, and was last updated 3 years, 2 months ago by Tom.
November 7, 2019 at 8:52 pm #1056531Immi
Hi, My site header is weird spreading in mobile devices after implement Google Adsense code in WP_head hook.
I have attached screenshots of the issues where I seeing the spreader site header and also where I have placed the code at WP_head hook.
Please help me how to fix this issue.November 8, 2019 at 8:38 am #1057108LeoStaffCustomer Support
David and I both checked your site and we are not seeing the issue.
I’ve tried incognito mode so no Adblock is added.
Have you solved this?
Do you have another device to check?
Let me know 🙂November 8, 2019 at 9:20 am #1057147Immi
Yes, I have checked on multiple devices but facing the same issue on multiple mobile devices. If I remove google Adsense code from WP_head hook problem is solved.
as Mr David say here WP_head hook can be selected to add code into the header.
I have removed the code from Theme editor after Mr David say and placed the code on GP Hook Element. After implementing Google Adsense code in WP_head hook my site header spread or showing google ads with spreading header. Which is looking weird.
**November 8, 2019 at 4:20 pm #1057419TomLead DeveloperLead DeveloperNovember 8, 2019 at 8:42 pm #1057506Immi
Yes, Tom, empty space is displaying by the ad in site header for mobile devices only. I have added Google Adsense Auto ad code in WP_head hook like this.
**November 9, 2019 at 9:08 am #1058001TomLead DeveloperLead DeveloperNovember 9, 2019 at 10:00 am #1058030Immi
Hi, Tom, I put that code in the wp_head area because it is Google Adsense Verification Code and Auto ad code. And google also says paste it between the <head> and </head> tags of your site:
I don’t want to display ad in the header area as showing empty space is being added by the ad itself.
Can you suggest me a place where I add Google Adsense Verification Code and Auto ad code? without facing such as issues.
**November 9, 2019 at 4:50 pm #1058188TomLead DeveloperLead DeveloperNovember 9, 2019 at 10:48 pm #1058277Immi
Okay, I have removed the Auto ad code from wp_head, and I will try to add manual ads after Google Adsense Verification Code successfully implement. But the question is, where should I add this Google Adsense verification code before this?
If I use the hook element and add Adsense Verification code inside WP_Head, the problem is that a blank ad space appears in the header of the site, which appears on mobile devices and looks very bad.
I have also tried Insert Headers and Footers plugin for adding Adsense Verification code. And also placed this code in appearance>Theme editor> header.php between the <head> and </head> tags. But, unfortunately, facing the same issue.November 10, 2019 at 10:28 am #1058818TomLead DeveloperLead Developer
If it’s just a verification code, it shouldn’t cause any space, as it shouldn’t render anything. Only the Adsense code that renders an ad should create a space in the HTML. If that code is placed where you want the ad, it should work.
Placing something in the
<head>tags is the same as using
- You must be logged in to reply to this topic.