Can i put php function like this using ad inserter, i like this plugin and dont want to create child theme for this function?
function tw_unload_files_except_single_post() {
if ( !is_singular('post') ) {
wp_dequeue_style ( 'wp-block-library' );
}
}
add_action( 'wp_enqueue_scripts', 'tw_unload_files_except_single_post', PHP_INT_MAX );