-
Home
-
AItoSocial
- Tips
How to Hide AItoSocial Admin Menus
function plt_hide_aitosocial_menus() {
//Hide "AItoSocial".
remove_menu_page('ai-poster');
//Hide "AItoSocial → Dashboard".
remove_submenu_page('ai-poster', 'ai-poster');
//Hide "AItoSocial → Accounts".
remove_submenu_page('ai-poster', 'ai-poster-accounts');
//Hide "AItoSocial → Calendar".
remove_submenu_page('ai-poster', 'ai-poster-calendar');
//Hide "AItoSocial → Logs".
remove_submenu_page('ai-poster', 'ai-poster-logs');
//Hide "AItoSocial → Apps".
remove_submenu_page('ai-poster', 'ai-poster-apps');
//Hide "AItoSocial → AI Prompts".
remove_submenu_page('ai-poster', 'ai-poster-prompts');
//Hide "AItoSocial → Settings".
remove_submenu_page('ai-poster', 'ai-poster-settings');
//Hide "AItoSocial → Upgrade".
remove_submenu_page('ai-poster', 'ai-poster-pricing');
}
add_action('admin_menu', 'plt_hide_aitosocial_menus', 1000000000);
Where do I put this code?
How to Hide AItoSocial Meta Boxes
function plt_hide_aitosocial_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "AI Content" meta box.
remove_meta_box('disable_generate_ai_content_meta_box', $screen->id, 'side');
//Hide the "AItoSocial" meta box.
remove_meta_box('fs_poster_meta_box', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_aitosocial_metaboxes', 20);