0

I am trying to remove a admin menu page added by another plugin. I got the settings I want configured so the page is no longer needed. So to reduce clutter, and to prevent an admin from accidentally messing up the settings, I want to remove the settings page altogether.

The page I am trying to remove is located at:

wp-admin/options-general.php?page=amazon-s3-and-cloudfront

I added the following to a file in mu-plugins:

function remove_s3_settings_page() {
    remove_submenu_page( 'options-general.php', 'amazon-s3-and-cloudfront' );
}

add_action( 'admin_menu', 'remove_s3_settings_page', 999 );

Problem is this does nothing, but I see absolutely no reason why this shouldn't work. Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy