Home Forums WoodMart support forum Submenu problem

Submenu problem

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #331090

    sergiocosta
    Participant

    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.

    #331142

    Artem Temos
    Keymaster

    Hello,

    There is an error in your custom JS code in the child theme. Please, remove or fix this code first https://gyazo.com/9258120e049197d222eadeef18263fd2

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)