add this script in an HTML widget before The Post List will fix the problem for me, the problem seems to be in the Packary script
<script>
document.addEventListener('DOMContentLoaded', function() {
// Attendi che Elementor abbia finito di caricare la sezione
window.addEventListener('elementor/frontend/init', function() {
// Aspetta un attimo per sicurezza che tutti gli elementi siano resi
setTimeout(function() {
var grid = document.querySelector('.works-grid-container.layout-packery');
if (grid && typeof jQuery !== 'undefined') {
// Cerca una funzione di Packery o Isotope
if (jQuery(grid).data('packery')) {
jQuery(grid).packery('layout');
console.log('Packery relayout for .works-grid-container triggered via Elementor init.');
} else if (jQuery(grid).data('isotope')) {
jQuery(grid).isotope('layout');
console.log('Isotope relayout for .works-grid-container triggered via Elementor init.');
} else {
console.warn('Packery or Isotope instance not found on .works-grid-container.');
}
} else if (grid) {
// Fallback: prova un evento generico o un setTimeout più lungo se jQuery non è definito
console.warn('jQuery not available or grid not found, trying generic relayout after a delay.');
setTimeout(function() {
// Potresti aver bisogno di una funzione specifica del tema/plugin per il relayout
// o di chiamare Packery direttamente se è globale.
// Questo è più complesso senza accesso alla codebase del plugin.
}, 500); // Prova con un piccolo ritardo
}
}, 300); // Piccolo ritardo per assicurarsi che tutti gli elementi siano nel DOM
});
});
</script>