Tips on Customizing All in One SEO – Best WordPress SEO Plugin – Easily Improve SEO Rankings & Increase Traffic

How to Hide All in One SEO Admin Menus

function plt_hide_all_in_one_seo_pack_menus() {
	//Hide "Tools → Redirection Manager".
	remove_submenu_page('tools.php', 'http://127.0.0.1/wp-admin/admin.php?page=aioseo-redirects');

	//Hide "All in One SEO".
	remove_menu_page('aioseo');
	//Hide "All in One SEO → Dashboard".
	remove_submenu_page('aioseo', 'aioseo');
	//Hide "All in One SEO → General Settings".
	remove_submenu_page('aioseo', 'aioseo-settings');
	//Hide "All in One SEO → Search Appearance".
	remove_submenu_page('aioseo', 'aioseo-search-appearance');
	//Hide "All in One SEO → Social Networks".
	remove_submenu_page('aioseo', 'aioseo-social-networks');
	//Hide "All in One SEO → Sitemaps".
	remove_submenu_page('aioseo', 'aioseo-sitemaps');
	//Hide "All in One SEO → Redirects".
	remove_submenu_page('aioseo', 'aioseo-redirects');
	//Hide "All in One SEO → Local SEO".
	remove_submenu_page('aioseo', 'aioseo-local-seo');
	//Hide "All in One SEO → SEO Analysis".
	remove_submenu_page('aioseo', 'aioseo-seo-analysis');
	//Hide "All in One SEO → Tools".
	remove_submenu_page('aioseo', 'aioseo-tools');
	//Hide "All in One SEO → Feature Manager".
	remove_submenu_page('aioseo', 'aioseo-feature-manager');
	//Hide "All in One SEO → About Us".
	remove_submenu_page('aioseo', 'aioseo-about');
	//Hide "All in One SEO → Upgrade to Pro".
	remove_submenu_page('aioseo', 'https://aioseo.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=admin-menu');
}

add_action('admin_menu', 'plt_hide_all_in_one_seo_pack_menus', 100000);

Where do I put this code?

How to Hide the "AIOSEO Settings" Meta Box

function plt_hide_all_in_one_seo_pack_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "AIOSEO Settings" meta box.
	remove_meta_box('aioseo-settings', $screen->id, 'normal');
}

add_action('add_meta_boxes', 'plt_hide_all_in_one_seo_pack_metaboxes', 20);

How to Hide the "SEO News" Dashboard Widget

function plt_hide_all_in_one_seo_pack_dashboard_widgets() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Remove the "SEO News" widget.
	remove_meta_box('aioseo-rss-feed', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_all_in_one_seo_pack_dashboard_widgets', 20);