• Resolved theukdirectory

    (@theukdirectory)


    Hi,

    I currently use DFP handle my ad serving but wanted to use Advanced Ads to control which dfp tags show on my site depending on the tag/category the post is in. I’ve I’ve some content that isn’t suitable to show Adsense on so thought this would be a perfect solution.

    I have a responsive site and depending on the screen size ads show in different locations depending on the screen size, this is all controlled from within the dfp tag.

    This was working fine until I set up advanced ads.

    I set everything up in advanced ads and everything Worked perfectly or so I thought.

    I’ve now noticed that some of the formattings is off on the page when the page isn’t the right size for the ad to be shown.

    I’ve pinned down the problem and it seems that advanced ads is wrapping my adcode in a div block: As seen in the example below

    <div class=”bigst-articleinline” id=”bigst-1992775293″><div class=”adsbygoogle” id=”div-gpt-ad-1234567891235-0″ style=”display: none;”> </div></div>

    Is there any way for me to change this so it just outputs my ad code without wrapping it in the div?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Thomas Maier

    (@webzunft)

    Hi theukdirectory,

    thanks for reaching out.

    Advanced Ads does indeed add an additional wrapper to ads placed automatically using our placements. It is needed for some features to work properly and removing it might break compatibility.

    I would like to learn more to see if there is another solution for you since I have never had an issue with DFP in these containers. Is there something hand-coded in your DFP ads that need the body tag to be placed without a container?

    Thanks,
    Thomas

    Thread Starter theukdirectory

    (@theukdirectory)

    Hi Thomas,

    Thanks for your quick reply, you can ignore my question, it’s my mistake, after a long day in front of the computers when setting it up, I’ve forgotten to tick a box in my theme so that it doesn’t apply margins, sizes etc to the ad area when at mobile screen size.

    Because the dfp box collapses itself if no ad is showing, so the theme formatting wasn’t showing, I’d mis diagnosed it to the extra div containers.

    Plugin Author Thomas Maier

    (@webzunft)

    Thank you for your update. I know these long days 🙂

    Please let me know if you need anything else.

    Thomas

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Extra div Block’ is closed to new replies.