How to Remove Add Media Button in WordPress

Prem Tiwari - - WordPress, WordPress Snippets

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.

Prem Tiwari

Prem Tiwari is the founder of and also a professional developer and a blogger by hobby.

Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

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