-
Home
-
WordAI
- Tips
How to Hide WordAI Admin Menus
function plt_hide_wordai_menus() {
//Hide "WordAI".
remove_menu_page('word-ai-topmenu');
//Hide "WordAI → API Settings".
remove_submenu_page('word-ai-topmenu', 'word-ai-topmenu');
//Hide "WordAI → Content Settings".
remove_submenu_page('word-ai-topmenu', 'sc-wordai-content-settings');
//Hide "WordAI → Image Settings".
remove_submenu_page('word-ai-topmenu', 'sc-wordai-image-settings');
}
add_action('admin_menu', 'plt_hide_wordai_menus', 11);
Where do I put this code?
How to Hide WordAI Meta Boxes
function plt_hide_wordai_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "AI Content Generator" meta box.
remove_meta_box('sftcy_wordai_metabox', $screen->id, 'side');
//Hide the "Excerpt" meta box.
remove_meta_box('postexcerpt', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_wordai_metaboxes', 20);