• On the product page it loads the first 16 products well and with the images but if you scroll down, the next 16 dresses are loaded but without an image, how can this be solved? Thank you very much ??

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Facundo Arano

    (@aranofacundo)

    Hi there,
    Please, add the following code in the functions.php file of your current theme, and then check if the issue solved.

    if ( ! function_exists( 'yith_infs_jetpack_lazy_load_fix' ) ) {
    	function yith_infs_jetpack_lazy_load_fix() {
    		if ( class_exists( 'Jetpack' ) ) {
    			$js = "
    			jQuery( document ).on( 'yith_infs_added_elem', function (){
    				const elem = document.querySelector( 'body' );
    				const jetpackLazyImagesLoadEvent = new Event( 'jetpack-lazy-images-load' );
    				elem.dispatchEvent(jetpackLazyImagesLoadEvent);
    			});
    			";
    			wp_add_inline_script( 'yith-infinitescroll', $js );
    		}
    	}
    	add_action( 'wp_enqueue_scripts', 'yith_infs_jetpack_lazy_load_fix', 20 );
    }

    Also, don’t forget to clean the cache of your browser and site before testing it.

    Thread Starter danidominiosa

    (@danidominiosa)

    I went to functions.php inside my theme (shoptimizer) folder and added that code to the very bottom and then the website doesn’t work and says there is a critical error. I can give you the access data to the web and you look at it? Thank you very much ??

    Plugin Support Facundo Arano

    (@aranofacundo)

    Hi there,
    Unfortunately, you can’t share the credentials here, but I did check the code and there shouldn’t be any issue.
    Try checking that the code is correct and also placed at the bottom of the functions.php file.

    We remain at your disposal.

    Thread Starter danidominiosa

    (@danidominiosa)

    Thank you very much, in the end it worked, surely I copied it wrong. Can I then update the theme and plugins without problems with this code? Thank you very much

    Plugin Support Iván Sosa

    (@ivansosa)

    Hi there,

    you can update your plugins and theme, as long as you have a child theme where you can add all this custom code.
    In this way, you would not lose the codes because the child theme is never updated.

    We hope it helps you.

    Have a nice day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Issue with Yith infinite scrolling: No images displayed on products when loading’ is closed to new replies.