We have to use a Plugin which seem to make the website very slow.
This snippet e.g. restrict loading of a calendar Plugin on all pages except on Page “Events”:
add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
if ( !is_page('Events') ) {
wp_deregister_script( 'wpng-calendar' );
wp_deregister_script( 'date-js' );
wp_deregister_script( 'thickbox-js' );
wp_deregister_script( 'jquery-js' );
wp_deregister_script( 'wiky-js' );
}
}
But what I need is to load the Plugin on single Posts and restrict loading anywhere else.