[resolved] How to make Google Adsense Responsive? (9 posts)

  1. Stolwij
    Posted 2 years ago #

    People i desperately need your help!

    You probably all heard it before.

    I have a responsive theme and placed Google Adsense on it, but on the mobile it's not showing responsive.

    Can anybody explain to me in a 'newbie language' how i can make my ads responsive?

    Please and thank you in advance!

  2. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Depends on how your theme is coded...you'll probably have to know CSS and HTML (and possibly how WP is coded) to change that.

  3. Stolwij
    Posted 2 years ago #

    I know a little of css and html.

    If someone can guide me, i probably can fix it.
    What do i need to do, to make it responsive please can someone help?

  4. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Depends on the theme and how it's coded...you'll have to look at the CSS for where the ads are positioned - and change that to be responsive to smaller browser widths. That's often done using media queries -



    You might also want to ask this on a CSS forum such as:


  5. Stolwij
    Posted 2 years ago #

    Those links are too difficult for me to carry out WPyogi.

    Can anybody please explain simple, how to change this code to responsive?

    <script type="text/javascript"><!--
    google_ad_client = "ca-pub-.............
    /* Sneap Home pagina */
    google_ad_slot = "...........";
    google_ad_width = 728;
    google_ad_height = 90;
    <script type="text/javascript"

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Please, Thank You!

  6. Michael
    Part-Time Forum Moderator
    Posted 2 years ago #

    try checking the google adsense forums - afaik, there is yet generally no 'responsive adsense' easily available - this is not limited to WordPress sites.

    web search might give you some more insights: 'responsive adsense'

  7. CrouchingBruin
    Posted 2 years ago #

    I've tried helping others with AdSense resizing problems before, and the problem is that the ads get output inside an iFrame. When you pick a particular ad format, you pick a specific size, and the iFrame code comes with the width & height attributes set. While you can override the size attributes for the iFrame by adding width & height CSS properties, you can't touch the contents of the iFrame with CSS, since it reflects the contents of another site, so resizing the iFrame, e.g., making it smaller for a narrower view port, will generally cut off parts of the ad.

    This problem is more apparent in AdSense ads which have a wide, horizontal format which are intended to fit in the main content area of a page, rather than the vertical, tall thin ads which are intended to fit inside a sidebar. So if you do have the wider ads, I would consider switching to the vertical ones and putting them in a sidebar, or in a narrow widget area of the footer.

  8. Stolwij
    Posted 2 years ago #

    Thanks all for your help!

    I solved it because in the block of adsense there's the option to choose responsive.

    I looked over it!

    After i choosed that, you receive a responsive code.
    Then it will work!

    Thanks all!

  9. kcraighead
    Posted 1 year ago #

    I have actually written an article on this topic. I found that when I copied and pasted the responsive code in my WordPress website that Google provided it simply didn't work.

    I use the Genesis theme and after a bit of digging online I figured out a way that worked for me.

    If you are interested you'll find the article here:

    Hopefully someone will find these instructions useful. I know I would have loved some simple steps like these myself!

Topic Closed

This topic has been closed to new replies.

About this Topic