mikebroad
Member
Posted 11 months ago #
Hi hope someone can help me.
I have created a custom post type with the main image editor hidden using advanced custom fields plugin, so only the title and featured image are showing.
When I set a featured image the "insert into post" button is still showing, but obviously does nothing. I was wondering if there was a way to hide it as so not to confuse the end user.
tienvijf
Member
Posted 6 months ago #
I would like to do the same thing.
Anybody any idea how to do this? I have seen it in a theme once but i cant remember which one.
PursuitKeith
Member
Posted 3 months ago #
I've been trying to accomplish this for the last dozen projects I've worked on and finally figured out a way to do it.
You can use CSS to target an element by an attribute value. This is what I used to get rid of the Insert into Post button:
input[value="Insert into Post"] { display:none; }
Just insert this into the head of the screens that you don't want to display the button and poof. You will need to use the admin_head hook, but you can target specific admin screens if you don't want to remove it from everywhere.
Hope that helps!