1. 主页
  2. WordPress高阶
  3. 删除网站左侧不需要的代码

删除网站左侧不需要的代码

// 删除网站左侧不需要的代码
function remove_menus(){
remove_menu_page( ‘index.php’ ); //Dashboard
remove_menu_page( ‘jetpack’ ); //Jetpack*
//remove_menu_page( ‘edit.php’ ); //Posts
//remove_menu_page( ‘upload.php’ ); //Media
//remove_menu_page( ‘edit.php?post_type=page’ ); //Pages
remove_menu_page( ‘edit-comments.php’ ); //Comments
//remove_menu_page( ‘themes.php’ ); //Appearance
//remove_menu_page( ‘plugins.php’ ); //Plugins
remove_menu_page( ‘users.php’ ); //Users
remove_menu_page( ‘tools.php’ ); //Tools
remove_menu_page( ‘options-general.php’ ); //Settings
//remove_menu_page( ‘us-theme-options’ ); //theme impreza
remove_menu_page( ‘vc-general’ ); //composer
remove_menu_page( ‘wpseo_dashboard’ ); //seo
//remove_menu_page( ‘revslider’ ); //slider
}
add_action( ‘admin_menu’, ‘remove_menus’ );

更新于 2018年12月4日

帮到你了吗?

相关文章