Hello xTemos,
We are trying to add our website the Vivino widget, but for some reason, there are a problem with submenu. Simply, the submenu doesn’t appear.
We already tried different ways to set the script, like this:
add_action( ‘wp_enqueue_scripts’, function () {
//wp_register_script( ‘my-script’, get_stylesheet_directory_uri() . ‘/js/vivino-widgets.js’ );
wp_register_script( ‘my-script’, ‘https://www.vivino.com/external/vivino-widgets.js’, ”, ”, true );
wp_enqueue_script( ‘my-script’ );
} );
add_filter( ‘script_loader_tag’, function ( $tag, $handle ) {
if ( ‘my-script’ !== $handle ) {
return $tag;
}
return str_replace( ‘ src’, ‘ async src’, $tag );
}, 10, 2 );
Check my website link.
We appreciate your help.