Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1052831

    I am using a masonry for posts on a bar page. On the initial page load, the “excerpt” underneath the image does not load. If you to to filter” beach bar” or “bar” and then go back to “all” you they do seem to appear.

    The issue appears when you choose “lazy loading” on jetpack. Is there a way to get it to work with this as we have had very good results with lazy loading on the mobile site.

    Keith

    • This topic was modified 5 years, 11 months ago by roamingk.
    #1053493

    Hey roamingk,

    Thank you for using Enfold.

    This script will force the portfolio grid to re-render or re-position until it’s fully loaded.

    add_action('wp_footer', 'ava_auto_resize');
    function ava_auto_resize(){
    ?>
    <script>
    (function($){	
    	var int = window.setInterval(function(){
    		console.log('tick');
    		$(window).trigger('resize');
    		$(window).trigger('av-content-el-height-changed');
    	}, 1000);
    	
    	$(window).on('load', function() {
    		clearInterval(int);
    	});
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #1053732

    Hi Ismael,
    Do I add this to the functions script ? I added it here, but the issue is still occurring… I also cleared all caches.

    Keith

    • This reply was modified 5 years, 11 months ago by roamingk.
    #1053889

    Hi,

    You have to add it in the functions.php file. Please disable the cache and minification plugin temporarily.

    Best regards,
    Ismael

    #1054245

    Added the code to the end of the functions.php page, I cleared the cache, turned off the performance for enfold, purged all the cached pages and turned off the WP Jetpack hosting for images, but kept lazy loading on, and it still gives issue with the loading of the images, and sometimes the results are different with some images showing the excerpt below in the masonry and sometimes not.

    Any ideas what I might be doing wrong?
    K

    #1055404

    Hi,

    Did you set jQuery to load in the footer? It’s an option in the Performance panel. The console reported that jQuery is not defined, so the script above is actually not being executed properly.

    Best regards,
    Ismael

    #1055953

    Yes, should I unclick it?

    #1056124

    Hi Keith,

    Yes, please try to uncheck that option to see if it helps or not.

    Best regards,
    Rikard

    #1056643

    Hello, I disabled that option and cleared the cache. The issue is still occurring. Results are inconsistent on each refresh.

    #1056782

    Hi roamingk,

    Well, masonry and images lazy load are not really compatible at this point.

    Best regards,
    Victoria

    #1056810

    ok I will disable and wait until you have an update :-) thanks for the assist so far.

    #1056841

    I do not have lazy loading enabled and am still seeing this behavior on Masonry after the last update, even with animation turned off.
    It seems like you have to scroll past the masonry and to get it to “fire”…

    #1057174

    Hi Rob,

    I could not reach your website today. Are blocking locations?

    Best regards,
    Victoria

    #1057309

    Hi Victoria and happy 2019!
    Yes I was blocking locations to reduce bots… blocking is turned off except for China now. Let me know please if you need China opened as well.

    Best,
    Rob

    #1057797

    Hi Rob,

    No, we don’t need China. The images load with animation on my end.

    Best regards,
    Victoria

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.