How To Disallow theme switching


Sponsored Links




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.

Disallow Theme Switcing WordPress

Disallow Theme Switcing WordPress


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

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Indexhibit Like Theme For Wordpress - JavaScript Window

For some reason we need to Disallow theme switching in WordPress, why we need disable this featured image featured? Like we all know Featured Images is new features that Read More

User Account Control in Windows 7 Best Practices

Although it is not necessary to close programs or files before switching users, it is a good idea to save any open files before switching users. Read More

How to Disable “Switch User” Option in Windows Vista and 7

In right-side pane, double-click on "Hide entry points for Fast User Switching" option and set it to Enabled. 4. That's it. Now "Switch User" option will be disabled from Read More

WordPress › Support » [Theme: Graphene] Multisite multilanguage

Moreover, I'd like to know HOW exactly the switching should work from the user MSLS developer, I just wanted to check if there was any reason the theme would disallow Read More

WordPress › Support » Can't leave a comment

-switching to the default theme ("twentyten") for a moment by renaming your current theme's discussion' box below the post/page editor, you can then allow/disallow Read More


5 Responses to How To Disallow theme switching

  1. Pingback: Tweets that mention How To Disallow theme switching #tricks #actions #client #disallow #explored -- Topsy.com

  2. Pingback: Tweets that mention How To Disallow theme switching # WordPress Tricks & Tips -- Topsy.com

  3. Pingback: Daily Tip: How to Disable Theme Changing in the WordPress Dashboard - WordPress MU and BuddyPress plugins, themes, support, tips and how to's

  4. Paul Geisler says:

    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’);

  5. Pingback: Choose Perfect WordPress Theme | WordPress News Wire

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>