How To Exclude/Remove Sidebar Or Any Other Part Of Blog From Lazy Load Plugin

Posted by Ankur Gandhi in Wordpress



wp How To Exclude/Remove Sidebar Or Any Other Part Of Blog From Lazy Load PluginHi Friends, Some days ago I wrote one article about how to add lazy loading to wordpress (Page Fading Like Mashable) in which I have explained about one plugin by which we can add page/image fading like Mashable. After adding this plugin to site it will work perfectly on whole page of our site, in which it fades whole page of site and also fade all images exists on that page but sometime what happens it didn’t replace all images perfectly on sidebar and also not fade logo perfectly. So sometimes we need to remove/exclude some part of our website from fading. So below are the steps when you want to exclude some parts of page from fading.

1. First to do this we have to edit plugin file, So please take backup first before change that plugin file.

2.  Activate plugin.

3. Go to Plugins->Editor.

4. Select “jQuery lazy load plugin” from “Select plugin to edit:” drop down menu and click Select.

5. By default it will open jq_img_lazy_load.php file. So search below code in this file.

jQuery("img").lazyload({

6. Now this code is to use fade all images exists on page. Now if just for example I want to apply fade plugin on only my content part, not on sidebars and also not on header and footer part, So first I have to find id of my content part, Now on my website my div is of content part, So my id is ‘post-blog’ , So to exclude sidebar, header and footer I will replace above code with code given below.

jQuery("#post-blog img").lazyload({

7. After replacing this code save file and it will just fade only content part on my site not sidebar,footer,header part.

By this way you can Exclude/Remove Sidebar Or Any Other Part Of Blog.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

  • Goon

    i I am currently looking for some people to take up security forum & pen testing & Coding Just go to the forum and apply to be staff. there is also free passwords to sites and invites for demonoid and more

    go0nsquad.tk

  • http://www.cpdkstudio.com Captured Photography

    Hrmm…Can’t seem to get mine to work! I want LazyLoad to only work on my blog page/posts and not on the other pages I have on the site!

    I changed the code to this
    jQuery(“#blog_main img”).lazyload({

    But my other pages still load incorrectly

  • http://twitter.com/kaleazycreative Kaleazy Creative™

    Thanks for sharing this, I’ve been annoyed by this on my blog for weeks. No images on my sidebar were coming up until the end. And everyone else’s solution was terribly complicated. Much appreciated.

  • http://www.magento-themes.jextn.com magento themes

    I was facing this problem since last few days.i was not getting proper solution.Hope this will help me to solve.Thanks to let me know this.

  • http://www.mactonweb.com seo bangalore

     nice tips,I was not knowing how to solve, But after reading this blog ,I think i will able to do it. 

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Subscribe to HackingEthics

Enter your email address: