• Resolved mcdeth

    (@mcdeth)


    Hi is it possible to dequeue scripts on blog pages? any hook or anything that i can put into if !is_woocommerce()?

Viewing 1 replies (of 1 total)
  • Plugin Support fizanzvai

    (@fizanzvai)

    Hi,

    Thanks for reaching out to us.

    Please add the following snippet using a plugin called Code Snippets or, you can also add the following snippet inside your child theme’s functions.php file:

    add_action( 'wp_enqueue_scripts', function(){
    // Add the page slug. For example- about-us, contact, sample-page
    if( is_page( array( 'about-us', 'contact', 'sample-page' ) ) ){
    wp_dequeue_style( 'woo-variation-swatches' );
    wp_dequeue_script( 'woo-variation-swatches' );
    }
    }, 99 );

    Note: Please read the comment to add more page slugs. If you want to add the above snippet inside your theme’s functions.php file, It is recommended to add the Custom Code to the child theme’s functions.php file, to avoid any data loss while updating the Parent Theme.

    Hope to hear from you soon.

    Thank You

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