Disable WordPress Custom css section on WordPress Customizer Disable WordPress Custom css section on WordPress Customizer wordpress wordpress

Disable WordPress Custom css section on WordPress Customizer


You could try removing the section using the WP Customizer function hook:

function mytheme_customize_register( $wp_customize ){   $wp_customize->remove_section('custom_css');}add_action( 'customize_register', 'mytheme_customize_register' );

Obviously you can name the function to suit, but call this block in your theme's functions.php file and it should remove this admin section (it most likely has an ID of 'custom_css' but could potentially vary)

Source: https://codex.wordpress.org/Class_Reference/WP_Customize_Manager/remove_section#Parameters