Support » Plugin: YITH Infinite Scrolling » YITH Infinite Scrolling – images do not open in The7

  • Hi I am having problems with the WP plugin – YITH Infinite Scrolling. Could you help me?

    I have the latest version of WordPress and Woocommerce installed on the my website, theme The7.

    The problem is that when the plugin loads the following pages, the product images are not loaded. For example, on the page /shop/plavki-i-shorty/ after 16 products the following are loaded, but as you can see for yourself, pictures are not loaded …

    I would be grateful for any of your help. Regards, Oleg.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    please add this code in functions.php of your theme:

    add_action( 'wp_enqueue_scripts', 'yith_infs_the7_lazy_load_fix', 20 );
    
    if( ! function_exists( 'yith_infs_the7_lazy_load_fix' ) ){
        function yith_infs_the7_lazy_load_fix(){
            if( defined( 'THE7_VERSION' ) ){
                $js ="jQuery( 'img.iso-lazy-load.preload-me').each( function(){ var t = jQuery( this ); var img = t.data('src'); t.attr( 'src', img ); if( t.hasClass( 'show-on-hover' ) === false ){ t.css( 'opacity', 1 ) }; });";
    
                $lazy_load_fix = sprintf( 'jQuery(document).on("yith_infs_added_elem", function(){%s});', $js );
                wp_add_inline_script( 'yith-infinitescroll', $lazy_load_fix );
            }
        }
    }

    Let me know.

    Thread Starter loleg

    (@loleg)

    Cool! Thank you so much @yithemes !
    Can this fix be made to work without crutches in the form of code for functions.php? Because the theme is updated and the functions.php file is also updated with all the content.

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    in order not to lose any update of the theme you should use a child theme which in any case would be a correct practice to always do.

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