Home / Admin / Remove SEO Statistics from the Dashboard menu
Duplicate Snippet

Embed Snippet on Your Site

Remove SEO Statistics from the Dashboard menu

Code Snippet to remove SEO Statistics from the Dashboard menu

90+
Code Preview
php
<?php
add_action( 'admin_menu', 'aioseo_hide_search_stats_menu', 99999 );
function aioseo_hide_search_stats_menu() {
	global $submenu;
	if ( ! isset( $submenu['index.php'] ) ) {
		return;
	}
	foreach ( $submenu['index.php'] as $index => $props ) {
		if ( ! empty( $props[2] ) && admin_url( '/admin.php?page=aioseo-search-statistics' ) === $props[2] ) {
			unset( $submenu['index.php'][ $index ] );
			return;
		}
	}
}

Comments

Add a Comment