Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter 10k-design

    (@10k-design)

    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>
    Thread Starter 10k-design

    (@10k-design)

    this resolve my problem

    ' . get_bloginfo("template_directory") . '

    Thread Starter 10k-design

    (@10k-design)

    Thanks so much Andrew but doesn’t work, the problem for me is the double tag <?php

    <?php $featured_content = '<img src="'<?php bloginfo("template_directory"); ?>'/images/img.png" />'; ?>

    this give me this error

    Parse error: syntax error, unexpected '?' in /web/htdocs/www.etc...

Viewing 3 replies - 1 through 3 (of 3 total)