How to Remove Add Media Button in WordPress

Hello friends, This is the very short tutorial about WordPress hacks which will let you know how to remove media button for custom post type. Are you using custom post type in your WordPress website and want to remove the Add Media button for that particularly post type not for the all post type, then keep your close attention in this tutorial.

How to Remove Add Media Button in WordPress

How to Remove Media Button For Custom Post Type

Copy the below code snippet and paste it at the end of the functions.php file and save it. This will automatically remove the Add Media Button from that custom post type. It will also work with WordPress default post types like posts and pages.

How to Allow User to Access only own Media

Before implementing the below code, your post screen looks like:

before Add media button

If you want to allow users to access only own media files when they adding or updating the posts, pages, and custom post types. Use the below code in your functions.php file.

After implemented the above code your post screen look like:

after Add media button

Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , ,