Title: Hide HTML editor for all users except admin
Last modified: August 20, 2016

---

# Hide HTML editor for all users except admin

 *  [blk784](https://wordpress.org/support/users/blk784/)
 * (@blk784)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/hide-html-editor-for-all-users-except-admin/)
 * I need to hide the html editor for all users except the admins. I have located
   the line that shows the button in class-wp-editor.php and when I comment it out
   it disappears. When I wrap it in a if statement if(current_user_can(‘level_10’))
   it still appears. I found this code in the forums to be used to check for admin
   user but it seems to not work. Any ideas on how to accomplish this some other
   way or get current_user_can function to work how I want it to?

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/hide-html-editor-for-all-users-except-admin/#post-2538348)
 * Never, **ever**, edit core WordPress files! Try looking for a role management
   plugin instead.

Viewing 1 replies (of 1 total)

The topic ‘Hide HTML editor for all users except admin’ is closed to new replies.

## Tags

 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [is_admin](https://wordpress.org/support/topic-tag/is_admin/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/hide-html-editor-for-all-users-except-admin/#post-2538348)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
