0

I'd like to hide only certain theme options from certain logged in users (editor role). What do I need to add to the below? The below works but also removes it for the Admin user. I would like to deny other user roles access to the below section inside the customizer.


function my_customize_register() {     
global $wp_customize;
//$wp_customize->remove_panel( 'woocommerce' );  //Modify this line as needed  
$wp_customize->remove_panel( 'widgets' );  //Modify this line as needed
$wp_customize->remove_section( 'section-sidebars' );  //Modify this line as needed
$wp_customize->remove_section( 'section-footer-group' );  //Modify this line as needed

} 

add_action( 'customize_register', 'my_customize_register', 11 ); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.