Support » Plugins » Hacks » Hidding insert into post button while setting featured image

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hidding insert into post button while setting featured image’ is closed to new replies.