To remove those metaboxes from the post edit page for all user roles, add this code to your ‘functions.php’ file…
// removes layout options and design options metaboxes
function izzy_wizzy_lets_get_busy() {
remove_meta_box('layout-options','post','side');
remove_meta_box('design-options','post','side');
}
add_action('admin_head','izzy_wizzy_lets_get_busy');
To remove those metaboxes from the post edit page for all user roles except administrators, add this code to your ‘functions.php’ file…
// removes layout options and design options from all but administrators
if (!current_user_can('manage_options')) {
function izzy_wizzy_lets_get_busy() {
remove_meta_box('layout-options','post','side');
remove_meta_box('design-options','post','side');
}
add_action('admin_head','izzy_wizzy_lets_get_busy');
}
References:
https://codex.wordpress.org/Function_Reference/remove_meta_box
https://codex.wordpress.org/Function_Reference/add_action
https://codex.wordpress.org/Function_Reference/current_user_can
https://codex.wordpress.org/Roles_and_Capabilities