How to Disable Theme Switching

Sometimes it’s useful to remove some WordPress options for clients. After all – they’d just muck it up right?

If you’ve designed a bespoke WordPress theme for a website and want to disable theme switching, add the following code to your functions.php file.

This will hide the Themes tab for all users except for the first user in the database which is usually the Administrator user you used at setup (ID=1).

If you want to restrict the option to another user, just change the ID # on line 5.

Was this article helpful?

Keep In Touch With My Weekly Blog Email

A once-per-week daily digest of my posts from the week. No sales, no spam and I will not share your details with anyone else.


Wil is a dad, WordPress consultant, WordPress developer, business coach and mentor. He co-organizes the WordPress Sydney meetup group and has been on the organising committee for WordCamp Sydney since 2014. He speaks at many special events and contributes to the WordPress open source project. His likes are chillies, craft beer and electrogravitics.