I am trying to change a few of the options in the Set Featured Image popup in the Wordpress admin. I can't seem to find anything that determines if the popup window is a Featured Image or an Add Media popup.

I want to hide Align and Sizes fields for the Set Featured Image popup but have them visible for the Add Media panel.

I am able to use the attachment_fields_to_edit filter to remove certain fields but not for the two different pop up box types.

Is it possible to do this?

1 Answer 1


I'm familiar with attachment_fields_to_edit and don't recall ever seeing anything on being able to do modification as granular as you're suggesting. There's a WP global $screen (or is it $screens) that perhaps might help but I'm not too sure.

Have you considered - as hacky as it might sound - doing these things with CSS and/or javascript?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.