• Resolved wasanajones

    (@wasanajones)


    Hi – thanks for your great plugin(s)

    do you have any ideas on how to delay triggering of loading the feed. I’m trying to reduce the number of requests upon page loading and ideally would have some kind of lazy loading effect.

    so far I have not found a lazy load plugin that will work on div elements – so looking for creative ideas.

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author smashballoon

    (@smashballoon)

    Hi @wasanajones,

    The posts in the feed are loaded using PHP and so are rendered with the rest of your page content, so there isn’t an obvious way to delay it from loading. However, assuming you’re using this free version of the plugin there may be a way to creatively “lazy load” the content. It would require setting up a blank page on your site and adding the Facebook feed to it. You could then load it into your main page using JavaScript. For example:

    1) Create a new blank page in WordPress and add your Custom Facebook Feed shortcode to it. This will be used to house your feed which will be then be loaded into your actual page.

    2) Go to the page editor for the page where you want to display the feed, click on the ‘Text’ tab in the editor, and replace the existing shortcode with the following:

    <div id="cff-load" style="text-align:center">Loading...</div>
    <script>jQuery('#cff-load').load('http://yourwebsite.com/page .cff-wrapper');</script>

    3) Replace the URL in the script above with the URL to the new page that you set up

    If you view your page then it should now display the word “Loading…” in the feed on your page while the posts are loaded into the feed from your new page using JavaScript.

    Let me know whether that helps.

    John

    Thread Starter wasanajones

    (@wasanajones)

    wow, thanks for the detailed pro response

    I will see what I can come up with.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delay loading (lazy)’ is closed to new replies.