Support » Plugin: Ad Injection » Infinite scroll on front page broken by ad injection

  • Resolved robertliu


    I just installed Ad Injection and set up one ad to appear at the bottom of my content. I have Jetpack installed and have enabled Infinite Scroll.

    When I load my front page the single ad shows up at the bottom of my first blog post – great!

    But when I scroll down to the end of the page, the infinite scroll loads with the spinning circle thing. When the content is loaded, the entire webpage is replaced with just my “bottom ad” which appears at the top left corner.

    My current workaround is to disable in-content ads on my front page in which infinite scroll is enabled. It still displays fine on the individual pages/posts.

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


    Hi robertliu, what king of adverts are you using (e.g. AdSense)? Do the ads have any JavaScript that could interfere with the infinite scroll?

    Hi rml, I’m using Tradedoubler. This particular ad does use Javascript.

    And you’re right, it’s the ad that’s interfering with infinite scroll, not Ad Injection – I just tested inserting the ad directly into an old blog post and I get the same problem when the infinite scroll loads that post. My apologies.

    Will try to investigate this myself but please let me know if you do have any ideas.

    My coding is a bit rusty but it seems Tradedoubler’s javascript is only there to generate a random image url, for purposes of cache prevention and ensuring the image is always the latest.

    <script type="text/javascript">
    var uri = '' + new String (Math.random()).substring (2, 11);
    document.write('<a href="" target="_BLANK"><img src="'+uri+'" border=0></a>');

    As I’m only experimenting with ad placement at the moment, I will just disable cache prevention (use static image url) which tradedoubler does allow.

    rml – great plugin btw!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Infinite scroll on front page broken by ad injection’ is closed to new replies.