• Greetings,
    we have a problem with the plugin and Elementor Pro.
    Suddenly the badge is no longer only shown on desktop. We use a custom Single Product page, but every badge created with your plugin was visible until a few weeks ago.

    As you can see in the product link, the badge is now only seen on mobile and tablet. By deactivating Elementor Pro it becomes visible again, but as I said it is a problem that has only recently arisen and without having made other changes.

    Can you help us?

    Thanks

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    please add following code in the file functions.php of your theme and let us know if the problem persists.

    if( !function_exists('yith_wcbm_show_badge_on_desktop') ){
    
    add_action( 'wp_footer','yith_wcbm_show_badge_on_desktop' );
    
    function yith_wcbm_show_badge_on_desktop(){
    
    $script = "
    <script>
    setTimeout( function(){
    jQuery( '.elementor-hidden-desktop' ).find( '.woocommerce-product-gallery__wrapper' ).find( '.yith-wcbm-badge' ).appendTo( '.woocommerce-product-gallery__wrapper' );
    },
    );
    
    </script>
    
    ";
    
    echo $script;
    
    }
    }

    Thread Starter grafema

    (@grafema)

    Hello Alessio,

    thank you for your reply.

    I just add the code on my functions.php file, but does not work.
    I tried with the Child Theme, with Ocean WP theme and with a default theme.

    Can you check what is wrong?

    Best regards,
    Marcello

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    please replace previous code with the following one and check again.

    if( !function_exists('yith_wcbm_show_badge_on_desktop') ){
    
    	add_action( 'wp_footer','yith_wcbm_show_badge_on_desktop' );
    
    	function yith_wcbm_show_badge_on_desktop(){
    
    		$script = "
    			<script>
    			setTimeout( function(){
    				jQuery( '.elementor-hidden-desktop' ).find( '.woocommerce-product-gallery__wrapper' ).find( '.yith-wcbm-badge' ).appendTo( '.woocommerce-product-gallery__wrapper' );
    				},1000
    			);
    			
    			</script>
    			
    		";
    
    		echo $script;
    
    	}
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with Element Pro and YITH Badge’ is closed to new replies.