Hello @tomtc
Paste the below snippet to your active theme’s functions.php file and replace the id of the page as per your requirement.
/**
* Dequeue ckeditor js on specific page
*/
function dequeue_ckeditor_front_end() {
if ( is_admin() ) {
return;
}
global $post;
if( 469 == $post->ID ) {
global $GLOBALS;
$wp_footer = $GLOBALS["wp_filter"]["wp_footer"];
if(is_object( $wp_footer ) && !empty( $wp_footer )) {
$new_array = array();
foreach( $wp_footer as $key => $frontend_script ) {
if( $key != 10 ) {
$new_array[$key] = $frontend_script;
}
}
}
$new_data = new WP_Hook;
$new_data->callbacks = $new_array;
$GLOBALS["wp_filter"]["wp_footer"] = $new_data;
$handle = 'custom_script';
$list = 'enqueued';
if (wp_script_is( $handle, $list )) {
wp_dequeue_script( 'custom_script' );
wp_deregister_script( 'custom_script' );
}
$handle = 'ck_editor_cdn';
$list = 'enqueued';
if (wp_script_is( $handle, $list )) {
wp_dequeue_script( 'ck_editor_cdn' );
wp_deregister_script( 'ck_editor_cdn' );
}
}
}
add_action( 'wp_print_scripts', 'dequeue_ckeditor_front_end', 100 );