Hi,
I’ve been trying to implement the Masonry Blog Grid on one of my pages but have been finding it unreliable.
Earlier today, it would load in Chrome and Firefox, but not Safari.
At the moment, it loads in Chrome and Safari, but not Firefox.
If I resize the browser window, it will load.
Any thoughts?
Webpage and password in private content below.
Thanks
Hi,
Try adding this at the very end of your theme / child theme functions.php file:
function add_custom_script(){
?>
<script>
(function($){
$(window).load(function() {
$(this).trigger('resize');
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Remember to purge your cache after adding this.
Regards,
Josue