- This topic has 5 replies, 2 voices, and was last updated 7 years ago by Tom.
-
AuthorPosts
-
April 19, 2017 at 8:29 am #307711Hermann
Hi,
I have added a Google Script into wp_head Hook. If I look in the frontend there suddenly is a white space above my page header. If I remove the script, the white space disappears and the layout is correct again. No matter if I use a child theme or not.
Here is the URL: http://wpland.heuser-webjobs.de
Can anybody help? Thank you very much.
HermannApril 19, 2017 at 9:49 am #307762TomLead DeveloperLead DeveloperHmm, seeing some broken HTML. You’re sure you’ve added the code to the wp_head hook and not the Before Header hook?
Can you show me the code you’re adding?
April 19, 2017 at 11:32 pm #308035HermannHello Tom,
yes, I have added the code in wp_head. And I have installed another wordpress with the same confuíguration on another server. And the same problem occurs.
Here is the code:
<!-- Google Code for Remarketing Tag --> <!-------------------------------------------------- Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup ---------------------------------------------------> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = xxxxxxxx; var google_custom_params = window.google_tag_params; var google_remarketing_only = true; /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div> <img height="1" width="1" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/xxxxxxxx/?guid=ON&script=0" /> </div> </noscript>
April 20, 2017 at 9:36 am #308190TomLead DeveloperLead DeveloperI believe it’s the
<img>
tag in there inside the<noscript>
tags. What happens if you remove everything between<noscript></noscript>
?April 20, 2017 at 11:31 pm #308394HermannHi Tom,
I have removed the complete content between <noscript> and </noscript>. Now theres only the following code in wp_head hook, but there is no difference in frontend. Still the white space above the page.
Greets, Hermann
<!– Google Code for Remarketing Tag –>
<!————————————————–
Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
—————————————————>
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = xxxxxxxxx;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type=”text/javascript” src=”//www.googleadservices.com/pagead/conversion.js”>
</script>April 21, 2017 at 9:29 am #308598TomLead DeveloperLead DeveloperHave you removed the code completely? I’m not seeing any gap anymore.
-
AuthorPosts
- You must be logged in to reply to this topic.