Hide Post Media from other User in WordPress

When you make blog website and setup login register for user and define to user add post from front-end, you need to set user role, because of user can see and delete media file from his dashboard of other users media file post.

for this kind of issue you can easily solve by just put basic function in your theme function file, just copy paste below code –

thats it now user can only view media picture add by her only..

but if you want to set user role with different condition like post edit & delete and many more than you have to install plugin. by using user role editor plugin you can easily setup user role for more know about user role define see my blog postChange User Role using User Role Editor Plugin

“Hide Post Media from other User in WordPress”