-
Home
-
Ninja Forms – The Contact Form Builder That Grows With You
- Tips
How to Hide Ninja Forms Admin Menus
function plt_hide_ninja_forms_menus() {
//Hide "Ninja Forms".
remove_menu_page('ninja-forms');
//Hide "Ninja Forms → Welcome".
remove_submenu_page('ninja-forms', 'nf-welcome');
//Hide "Ninja Forms → Dashboard".
remove_submenu_page('ninja-forms', 'ninja-forms');
//Hide "Ninja Forms → Add New".
remove_submenu_page('ninja-forms', 'ninja-forms#new-form');
//Hide "Ninja Forms → Submissions".
remove_submenu_page('ninja-forms', 'nf-submissions');
//Hide "Ninja Forms → Import / Export".
remove_submenu_page('ninja-forms', 'nf-import-export');
//Hide "Ninja Forms → Settings".
remove_submenu_page('ninja-forms', 'nf-settings');
//Hide "Ninja Forms → Get Help".
remove_submenu_page('ninja-forms', 'nf-system-status');
//Hide "Ninja Forms → Add-Ons".
remove_submenu_page('ninja-forms', 'ninja-forms#add-ons');
}
add_action('admin_menu', 'plt_hide_ninja_forms_menus', 11);
Where do I put this code?
How to Hide Ninja Forms Meta Boxes
function plt_hide_ninja_forms_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Add-On Licenses" meta box.
remove_meta_box('nf_settings_licenses', $screen->id, 'advanced');
//Hide the "Append a Ninja Form" meta box.
remove_meta_box('nf_admin_metaboxes_appendaform', $screen->id, 'side');
//Hide the "User Submitted Values" meta box.
remove_meta_box('nf_sub_fields', $screen->id, 'normal');
//Hide the "Submission Info" meta box.
remove_meta_box('nf_sub_info', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_ninja_forms_metaboxes', 20);