-
Home
-
Contact Form DB – Elementor
- Tips
How to Hide Contact Form DB - Elementor Admin Menus
function plt_hide_sb_elementor_contact_form_db_menus() {
//Hide "Elementor DB".
remove_menu_page('edit.php?post_type=elementor_cf_db');
//Hide "Elementor DB → All Elementor DB".
remove_submenu_page('edit.php?post_type=elementor_cf_db', 'edit.php?post_type=elementor_cf_db');
//Hide "Elementor DB → Export".
remove_submenu_page('edit.php?post_type=elementor_cf_db', 'sb_elem_cfd');
//Hide "Elementor DB → Settings".
remove_submenu_page('edit.php?post_type=elementor_cf_db', 'sb_elem_cfd_settings');
}
add_action('admin_menu', 'plt_hide_sb_elementor_contact_form_db_menus', 11);
Where do I put this code?
How to Hide Contact Form DB - Elementor Meta Boxes
function plt_hide_sb_elementor_contact_form_db_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Form Submission" meta box.
remove_meta_box('sb_elem_cfd', $screen->id, 'normal');
//Hide the "Extra Information" meta box.
remove_meta_box('sb_elem_cfd_extra', $screen->id, 'normal');
//Hide the "Actions" meta box.
remove_meta_box('sb_elem_cfd_actions', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_sb_elementor_contact_form_db_metaboxes', 20);