Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you action the wp_enqueue_script and wp_dequeue_script hook ?

    Hello francisgallagher,
    Please add this code in functions.php file.

    /**
     * Dequeue Script
     * Hooked to the wp_print_scripts action, with a late priority (100),
     * so that it is after the script was enqueued.
     */
    
    function dequeue_script_on_specific_page() {
     if(!is_page(7084) ) {
      wp_dequeue_script('WPTS');
     }
    }
    add_action( 'wp_print_scripts', 'dequeue_script_on_specific_page', 100 );

    Hope this will solve your problem.

    Thanks

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

The topic ‘Calling scripts on certain page’ is closed to new replies.