Hidding insert into post button while setting featured image (3 posts)

  1. mikebroad
    Posted 4 years 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.

  2. tienvijf
    Posted 3 years 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.

  3. PursuitKeith
    Posted 3 years 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!

Topic Closed

This topic has been closed to new replies.

About this Topic