Support » Developing with WordPress » Remove Featured Image Field on Posts Edit Screen

  • I am really stumped. I have a site that needs to give the admin the option to put images on pages, but not posts. No matter what I do, I can’t seem to get the Featured Image meta box to disappear. Here is what I’ve tried.

    • Copy paste the function from this page ( into functions.php (I changed array( 'post' ) to array( 'page' ) to re-enable the feature for just pages.
    • Same as above without re-enabling anything. So, just adding remove_theme_support( 'post-thumbnails' ); to functions.php inside a setup function.
    • In my parent theme, I found the function that enables the post thumbnails, I commented out that line, no change.
    • Searched entire parent theme for add_theme_support to be sure it wasn’t enabled somewhere else, this is the only instance
    • Switched theme to Twenty Nineteen and removed the line for add_theme_support from functions.php
    • While keeping the Twenty Nineteen theme, added remove_theme_support( 'post-thumbnails' ); directly below add_theme_support( 'post-thumbnails' );
    • Same as above with add_theme_support( 'post-thumbnails' ); NOT commented out

    I don’t get it. It’s like the feature is permanent. I’ve played around with the priority, but the more direct method seems like it doesn’t work anyway. Anything that points me in the direction of what I’m missing would be greatly appreciated.

    The only other thing to mention is that I am not looking for a CSS fix. This is a site for a client, I don’t want to have a meta box on the admin side that doesn’t do anything. As a last resort, I can hide it with CSS on the admin side, but I’d rather find the right way to do it.


    • This topic was modified 1 month, 2 weeks ago by swani. Reason: forgot something
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.