Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Adjusting size of responsive ads

  • michellecouchfriedman

    Hi! I use Google AdSense, but I hate the giant banner at the top of the page that is automatically added. Instead, I wanted to add a smaller long, rectangle instead under the title of the website. I made a responsive rectangle ad but it is still too big. So Google provided a style code that is supposed to make the responsive ad smaller on different devices. But I don’t know where to put this Style code.

    Right now, I have no ad at all on the top of the page, and I won’t add that banner again until I can fix this since the giant ad Google Adsense puts there looks terrible and is awful for UX.

    This code might work if I can place it in the right place. Thank you!:

  • Hi there,

    You can try adding the <style> code along with the <script> code.

    Let me know if this helps 🙂

  • michellecouchfriedman

    I’m confused about where to put it.. would I put that in the head? Or in an element/ hook? Or somewhere else? Thanks!

  • I assume it’s the code for an ads, are you planing to add the ads manually to each post or do you want to use an element to add it?

  • michellecouchfriedman

    My Adsense code is already on the site via a header hook in elements, and AdSense ads are already displayed. I disabled the giant banner ad that covered everything above the fold because it looked terrible. Google has a “fix” that is supposed to make the banner responsive and smaller. It is a Style code and a script code (It’s in this string above). I just don’t know exactly how to add it to the site. I want it to appear below the title of the site on every page.

  • Then add it via a hook element, set the hook to after_header.

  • michellecouchfriedman

    Ok, thank you. I’ll give that a try now. :). Michelle

  • Let me know if that works.

  • michellecouchfriedman

    Thank you! That works, but for some reason, the banner ad is showing up flushed to the left. Is there an easy way to center it? It also seems to need padding on top since it is too close to the title of the site. Thanks!

  • Hi there,

    you can try this CSS:

    
    .banner_responsive_1 {
        margin: 20px auto 0;
    }
    
  • michellecouchfriedman

    Yay! That worked perfectly. Thank you!!! Michelle

  • You’re welcome

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