• Resolved trde

    (@trde)


    I am trying to disable (turn off) plugin on specific pages but with no luck so far with my custom function:

    add_action( ‘wp_enqueue_scripts’, ‘dequeue_mousewheel_smooth_scroll’ );
    function dequeue_mousewheel_smooth_scroll() {
    if ( is_page_template( ‘landing-page.php’ ) ) {
    wp_dequeue_script( ‘mousewheel-smooth-scroll’ );
    }
    }

    Any idea how to do that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kubiq

    (@kubiq)

    Instead of dequeue separate assets I recommend to use remove_action there is a plugin_scripts_load function inside wpmss class hooked on wp_enqueue_scripts.

    Plugin Author kubiq

    (@kubiq)

    If you’re not a programmer, you can use plugins like AssetCleanUp to achieve what you need

    Try free “plugin organizer” (by jeff sterup) go to specific page and on bottom disable specific plugin (for exampel smooth scroll)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable plugin on specific pages’ is closed to new replies.