Last active
June 15, 2016 15:15
-
-
Save dipakcg/9576d61f99a2eb4c725ee1b7dd28a705 to your computer and use it in GitHub Desktop.
WordPress - Remove menu or sub-menu page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ========================================== | |
Put the following code at the end of wp-config.php file to remove menu or sub-menu page. | |
========================================== */ | |
/* ********* | |
Line 10 will remove menu page of plugin: BackWPup | |
Line 11 will remove Settings menu | |
********* */ | |
function dcg_custom_menu_page_removing() { | |
remove_menu_page( 'backwpup' ); | |
remove_menu_page( 'settings' ); | |
/* To remove a settings page for plugins that use a slug like /wp-admin/options-general.php?page=wp-performance-score-booster use this code: */ | |
remove_submenu_page( 'options-general.php', 'wp-performance-score-booster' ); | |
} | |
add_action( 'admin_menu', 'dcg_custom_menu_page_removing' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment