-
Home
-
Contact Form Query
- Tips
How to Hide Contact Form Query Admin Menus
function plt_hide_contact_form_query_menus() {
//Hide the "Contact" menu.
remove_menu_page('stcfq_messages');
//Hide the "Contact → Messages" menu.
remove_submenu_page('stcfq_messages', 'stcfq_messages');
//Hide the "Contact → Settings" menu.
remove_submenu_page('stcfq_messages', 'stcfq_settings');
}
add_action('admin_menu', 'plt_hide_contact_form_query_menus', 11);
Where do I put this code?
How to Hide the "Contact Form Latest Messages" Dashboard Widget
function plt_hide_contact_form_query_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Contact Form Latest Messages" widget.
remove_meta_box('stcfq_latest_messages', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_contact_form_query_dashboard_widgets', 20);