-
Home
-
Custom Field Suite
- Tips
How to Hide Custom Field Suite Admin Menus
function plt_hide_custom_field_suite_menus() {
//Hide the "Tools → CFS Tools" menu.
remove_submenu_page('tools.php', 'cfs-tools');
//Hide the "Settings → Custom Field Suite" menu.
remove_submenu_page('options-general.php', 'edit.php?post_type=cfs');
}
add_action('admin_menu', 'plt_hide_custom_field_suite_menus', 11);
Where do I put this code?
How to Hide Custom Field Suite Meta Boxes
function plt_hide_custom_field_suite_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Fields" meta box.
remove_meta_box('cfs_fields', $screen->id, 'normal');
//Hide the "Placement Rules" meta box.
remove_meta_box('cfs_rules', $screen->id, 'normal');
//Hide the "Extras" meta box.
remove_meta_box('cfs_extras', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_custom_field_suite_metaboxes', 20);