-
Home
-
Custom Field Template
- Tips
How to Hide the "Custom Field Template" Admin Menu
function plt_hide_custom_field_template_menus() {
//Hide the "Settings → Custom Field Template" menu.
remove_submenu_page('options-general.php', 'custom-field-template.php');
}
add_action('admin_menu', 'plt_hide_custom_field_template_menus', 11);
Where do I put this code?
How to Hide the "Custom Field Template" Meta Box
function plt_hide_custom_field_template_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Custom Field Template" meta box.
remove_meta_box('cftdiv', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_custom_field_template_metaboxes', 20);