您可以这样做:
// remove the script from the queue if were are on the post ID 11
add_action(\'wp_enqueue_scripts\', \'remove_script_specific_post\');
function remove_script_specific_post(){
if( 11==get_the_ID() ){
wp_dequeue_script(\'my_script_handle\');
}
}
前提是脚本已添加
wp_enqueue_script