WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mikebroad
    Member
    Posted 3 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
    Member
    Posted 2 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
    Member
    Posted 2 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