How To Remove Media Upload Buttons in Post Editor

In the WordPress admin screen, when working in the post or page editor, you will see some media upload buttons above the TinyMCE editor. If you would like to hide them from your client, for example to disable the upload of such files, you can follow the steps below:

To Remove All Media Buttons

To Remove Only Some Buttons

In this case we need to add an admin stylesheet, so in your functions.php file paste the following:

Then create a file called my_admin.css within the ‘css’ folder of your theme, and insert the following:

If you enjoyed this post, make sure to subscribe to WPMayor’s RSS feed.

About Jean Galea

Jean Galea is a WordPress developer, entrepreneur and padel player. He is the founder of WP Mayor, the plugins WP RSS Aggregator and EDD Bookings, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Related Articles

4 Responses

  1. Custom Buttons
    Custom Buttons August 9, 2011 at 21:50 | | Reply

    Thanks for the tip on removing the GUI buttons. Since it requires a custom css, does this work for if the user might happen to switch themes? (I’m trying to prevent upload). And also does it prevent access to media from the left nav bar, or just the editor?

  2. Amereservant
    Amereservant November 2, 2011 at 04:31 | | Reply

    Thanks for this Jean!
    I was looking for a filter hook to remove this and wasn’t having any luck since the only test to prevent it from rendering is “if( !current_user_can(‘upload_files’))” and trying to hook anything involved with the checking didn’t work. (not sure what I was missing)

    After giving Google a go, I found your post and it worked like a charm!
    The only catch I see is it still requires adding CSS to hide the container div for it (at least in the 3.3-dev version), but at least the buttons are gone.

    Thanks again.

Leave a Reply