Remove SEOPress menu/submenu pages

Since SEOPress 1.0

add_action( 'admin_menu', 'seopress_remove_menu_page');
function seopress_remove_menu_page() {
    remove_menu_page( 'seopress-option' ); //SEO
}

add_action( 'admin_menu', 'seopress_remove_submenu_page', 999 );
function seopress_remove_submenu_page() {
    remove_submenu_page('seopress-option','seopress-titles'); //Titles & metas
    remove_submenu_page('seopress-option','seopress-xml-sitemap'); //XML / HTML Sitemap
    remove_submenu_page('seopress-option','seopress-social'); //Social Networks
    remove_submenu_page('seopress-option','seopress-google-analytics'); //Google Analytics
    remove_submenu_page('seopress-option','seopress-advanced'); //Advanced
    remove_submenu_page('seopress-option','seopress-import-export'); //Tools
    remove_submenu_page('seopress-option','seopress-bot-batch'); //BOT
    remove_submenu_page('seopress-option','seopress-license'); //License
    remove_submenu_page('seopress-option','seopress-pro-page'); //PRO
    remove_submenu_page('seopress-option','edit.php?post_type=seopress_404'); //Redirections
    remove_submenu_page('seopress-option','edit.php?post_type=seopress_bot'); //Broken links
    remove_submenu_page('seopress-option','edit.php?post_type=seopress_backlinks'); //Backlinks
}

Last modified: December 24, 2018