For some reason we need to Disallow theme switching in WordPress, why we need disable this featured? There are some reason why we should do it, such as Our WordPress powered site is Final Version, so we didn’t need to change the theme. Or The client “explored” the WordPress dashboard and “accidentally” switched the theme.
Using WordPress actions, we can easily remove the “themes” menu and consequently prevent the risk of having a client switching the theme.
Let’s get started, all we need to do only put several code on functions.php below
add_action('admin_init', 'remove_theme_menus');
function remove_theme_menus() {
global $submenu;
unset($submenu['themes.php'][5]);
unset($submenu['themes.php'][15]);
}
And done, you has disallow theme switching on WordPress. Thanks for this script




Pingback: Tweets that mention How To Disallow theme switching #tricks #actions #client #disallow #explored -- Topsy.com
Pingback: Tweets that mention How To Disallow theme switching # WordPress Tricks & Tips -- Topsy.com
Pingback: Daily Tip: How to Disable Theme Changing in the WordPress Dashboard - WordPress MU and BuddyPress plugins, themes, support, tips and how to's
Thanks for the info!
May be it’s better to disable the whole menu point ‘Appearance’
function remove_theme_menus() {
global $menu;
// removes ‘Appearance’
unset($menu[60]);
}
add_action(‘admin_init’, ‘remove_theme_menus’);
Pingback: Choose Perfect WordPress Theme | WordPress News Wire