Site logo

Archived topic

the site header is weird spreading in mobile devices.

9 replies · Started by Immi on November 7, 2019

Viewing posts 1–10 of 10

Hi there,

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 :)

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.
https://generatepress.com/forums/topic/how-to-remove-white-space-below-the-site-header/#post-1053993

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.

**

What code are you adding in wp_head, exactly? It looks like the empty space is being added by the ad itself.

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.

**

What if you add that code where you want the ad to show up instead of in the wp_head area?

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.

**

Maybe the auto ads are just placing the ad in a poor position? Have you tried adding manual ads?

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.

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 wp_head.

This archived topic is closed to new replies.