-
Home
-
ElasticPress
- Tips
function plt_hide_elasticpress_menus() {
//Hide "ElasticPress".
remove_menu_page('elasticpress');
//Hide "ElasticPress → Features".
remove_submenu_page('elasticpress', 'elasticpress');
//Hide "ElasticPress → Settings".
remove_submenu_page('elasticpress', 'elasticpress-settings');
//Hide "ElasticPress → Sync".
remove_submenu_page('elasticpress', 'elasticpress-sync');
//Hide "ElasticPress → Index Health".
remove_submenu_page('elasticpress', 'elasticpress-health');
//Hide "ElasticPress → Status Report".
remove_submenu_page('elasticpress', 'elasticpress-status-report');
//Hide "ElasticPress → Search Fields Weighting".
remove_submenu_page('elasticpress', 'elasticpress-weighting');
//Hide "ElasticPress → Synonyms".
remove_submenu_page('elasticpress', 'elasticpress-synonyms');
//Hide "ElasticPress → Custom Results".
remove_submenu_page('elasticpress', 'edit.php?post_type=ep-pointer');
}
add_action('admin_menu', 'plt_hide_elasticpress_menus', 51);
Where do I put this code?