Prevent Lazy Load From Hiding Your Blog Advertisements

jquery_logoRecently one of our clients was experiencing an issue with their advertisements not showing up when their wordpress blog loads. While troubleshooting the issue we found that the culprit was Lazy Load. Lazy loader is a jQuery plugin written in JavaScript which delays the loading of images until they’re in the visible part of web page.

Since lazy load was doing its job too well and preventing their advertisements from loading quickly, we took advantage of the “container” class used in the wordpress theme to fix the issue. This fix tells Lazy Load to only fire on images within the HTML object and not fire anywhere else on the page. This way lazy load is focused and doesn’t try to lazy load any of your advertisements or anything else on the page.

Here are the steps we took to fix the advertisement from being hidden when the blog loaded.

1. First edit the source code of the plugin. To do so go the plugin’s page in your wordpress dashboard.
2. Next locate “jQuery lazy load plugin” then click the “edit” button.
3. Insert (#container) within the existing code found below. This will disable lady load from firing on all of the images outside of the scrolling blog container.
4. Click “update file” when complete.

screenshot-www jvfconsulting com 2015-02-19 14-43-45
We recommend using lazy load on long web pages that contain many large images because it not only makes the page load faster, but it reduces the load on your server. Although using Lazy Load out of the box without applying this quick fix it could lead to slower load times for blogs rich in images and content.

  • Darren

    J Query is a new thing but Interesting …Its steps are looking easy to use ……..I surely apply ……
    Thanks for sharing……..:)

  • oh, a clever solution. That was interesting. This HTML and jQuery modification required a smart head to figure out! 🙂