How To Hide Entire Media Library Menu From WordPress Admin Area Dashboard?

WordPress media library contains all images, videos, recordings and files which you have uploaded and used inside your posts, pages, post types etc. Media is typically uploaded and inserted at the time of creating/editing content and the admin media menu (Dashboard -> Media) lets to access those files in bulk, it also allows you to upload media files through Dashboard -> Media -> Add New page but that is hardly used by bloggers.

Specially when you are designing your client’s website or running a BuddyPress powered social network, the media library menu confuses your website users who are not much familiar with WordPress.

A few days back someone emailed us asking how he can remove the media library menu from backend because his new memebers are authors and they are getting confused between WordPress media library and the BuddyPress albums feature (which works from the frontend).

Some are creating their photo albums on frontend (that’s what he want from all other members) whereas some new ones are uploading images to backend media libray page and sharing the links on their activity streams.

Hence removing the media library section from admin area will minimize the unnecessary confusions. This will make members to upload images to media library only at the time of writing/editing posts.

How To Hide WordPress Media Library Section From Dashboard?

No media section

What all you have to do is open your theme’s function.php file and add the following code:

add_action( ‘admin_menu’, ‘remove_menu_links’ );
function remove_menu_links() {
    global $submenu;
    remove_menu_page(‘upload.php’);
    foreach( $submenu[‘upload.php’] as $position => $data ) {
        $submenu[‘upload.php’][$position][1] = ‘desired cap here’;
    }
}

If you don’t like digging into your theme files then use Code Snippets plugin.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.