[Resolved] Google Adsense displaying in body but not header

Home Forums Support [Resolved] Google Adsense displaying in body but not header

Home Forums Support Google Adsense displaying in body but not header

  • This topic has 11 replies, 3 voices, and was last updated 4 years ago by Leo.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1244440
    jason

    Not sure why this is happening. Before using GP I had the ads in the header and body. Now, they only display in the body. I had have been using the insert header and footer plugin – I took that out and manually added the adsense code using the elements – hooks – display etc. Cleared cache and refreshed and there was no change. Any help would be appreciated – Not super techy, but learning. Here is my website

    http://www.livingdipfree.com

    The main part of my website is the forum section under “community” tab. With no header ads, nothing shows on my forum pages.

    Thank you in advance for the help.

    #1244570
    jason

    Update – ads displaying in the header on mobile but not desktop still.

    #1244653
    Leo
    Staff
    Customer Support

    Hi there,

    Which hook are you using?

    What is the code you are adding?

    Let me know πŸ™‚

    #1244721
    jason

    Here is the script
    <script data-ad-client=”ca-pub-3137224266747099″ async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script&gt;
    hook – after_header
    location – entire site

    #1244734
    jason

    Also – when i do an adsense preview on google I do not see an example ad in the header like I used to see. Just trying to think of any info that would be helpful. If I slide the ad load bar it just ads more ads in the boday.

    #1244814
    jason

    Update – I switched themes and the ad displayed correctly in the header section.

    #1244827
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    As long as the code you’re adding is added to the HTML of your page, it should display (regardless of the theme you’re using).

    Is the Element still active? I’m not seeing any Adsense code after the header.

    Let me know πŸ™‚

    #1244848
    jason

    Hey Tom – I took out the code from the element and used “insert headers and footers” widget, which is what I was using with the theme prior to GP. When I switched to the previous theme with this the ad displayed correctly. When I changed back to GP I deleted the hook and continued with the widget since I know it works on a different theme. Could it not be working because of the styling I did on the homepage or something like that? Pretty confused here.

    Thanks for reaching out.

    #1245211
    jason

    update – I disabled autoads and did a manual insert and that worked – mostly. the ad is now placed at the very top of my page – can we move that down to under site name? I am guessing that we can do that if I use the activate element = hook -> placement method but want to be sure before I mess with this anymore.

    Current example – http://www.livingdipfree.com

    Thanks!

    #1245524
    Leo
    Staff
    Customer Support

    Yup just choose the hook where you want the ads to display:
    https://docs.generatepress.com/article/hooks-visual-guide/

    #1248188
    jason

    Yep this worked – chose the hook “insert after header” and it placed the ad under the site title. Don’t’ know why autoads doesn’t work right but this does the trick afterall. Thanks

    #1248693
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.