Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #455321

    I’ve been using the Portfolio Items for a while with no issues. All of the sudden there is a strange issue on the page where the pictures are overlapping each other or not coming up fully. It’s like everything on the page is being condensed and the pictures aren’t fully loading. If you refresh the page it goes away, but the first time it loads it looks funky. I’ve tried in multiple browsers and on multiple computers and they all do the same thing. Any ideas?

    #455474

    Hi jasaunders!

    Thank you for using Enfold.

    Please try the solution provided here: https://kriesi.at/support/topic/masonry-gallery-images-stacking-on-top-of-each-other/#post-433895

    Regards,
    Ismael

    #456338

    Hi Ismael,

    I am sorry, I can not find where to replace the code from that thread. It says to replace the auto resize function in functions.php, but I don’t see an auto resize function in that file. I tried searching the whole directory for auto_resize and get no results too.

    Where specifically am I supposed to find the code to replace?

    I followed the prior advice in there from 2013 to add resize window function for jquery in the avia.js file, but that only resizes all the images once the whole page has loaded.

    #457145

    Hey!

    Oh Ok. That sure is confusing. Just add this in the functions.php file:

    add_action('wp_footer', 'ava_auto_resize');
    function ava_auto_resize(){
    ?>
    <script>
    (function($){	
    	var int = window.setInterval(function(){
    		$(window).trigger('resize');
    	}, 1500);
    	
    	$(window).load(function () {
    		setTimeout(function() {
    			clearInterval(int);
    		}, 5000);
    	});
    })(jQuery);
    </script>
    <?php
    }

    Remove browser cache then reload the page. The script will trigger the resize event every 1.5 seconds forcing the masonry images to position correctly.

    Best regards,
    Ismael

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