How to Remove Add Media Button in WordPress

| Last Updated: | In: WordPress, WP Labs


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.

Tags: , , , , ,


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.


You may also like:

Get Free Access of 450+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Free Guide: Learn how to implement security guideline in your WordPress site...

DOWNLOAD

Free WordPress Setup Service

Free WordPress Setup

Want to Setup WordPress Blog Setup? I will help you in the setup of your WordPress blog.

Click Here

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...

SEARCH NOW