WordPress 4.3+

As of WordPress 4.3, there are label options for ‘featured_image’, ‘set_featured_image’, ‘remove_featured_image’, and ‘use_featured_image’ that you can set to whatever you text you want to use.

featured_image – defaults to “Featured Image”
set_featured_image – defaults to “Set featured image”
remove_featured_image – defaults to “Remove featured image”
use_featured_image – defaults to “Use as featured image”

See the documentation, here: https://developer.wordpress.org/reference/functions/register_post_type/

 

WordPress < 4.3

For sites running a version of WordPress lower than 4.3, here’s how to change/filter the featured image metabox title and link text in WordPress:

To use this code, just make these changes:

  • Change “my_post_type_name” to the name of the post type for which you want to change the featured image text.
  • Change “NEW TITLE TEXT”, “NEW SET TEXT HERE” and “NEW REMOVE TEXT HERE” to the new text you want to use.
  • Change “km” to the function prefix & text domain of your choice.

 

Note: The default “Remove featured image” text is still visible immediately after an image is selected. The code above does not address that.

5 comments

  1. Binaya December 13, 2016 at 2:25 am

    Reply

    Hi

    This post is awesome but can you please let me know
    How can i remove the The default “Remove featured image” text is still visible immediately after an image is selected. The code above does not address that.

  2. Jeff April 26, 2017 at 4:35 pm

    Reply

    I just discovered, while working on a custom post type, that there are label options for ‘featured_image’, ‘set_featured_image’, ‘remove_featured_image’, and ‘use_featured_image’. If you add these to your setup args, you don’t need the above functions, and you won’t have to worry about doing any jQuery or stuff like that.

    https://codex.wordpress.org/Function_Reference/register_post_type

  3. MH Raihan July 15, 2017 at 8:47 pm

    Reply

    Hi,
    When thumbnail position move from side to normal, feature images preview size not change.
    Its still small preview, is there any way to make full size preview?

    • Kellen Mace July 17, 2017 at 6:29 am

      Reply

      I’ve never had to change the size of the featured image preview – not sure if there’s an easy way to do that. As an alternative, you could remove featured image support for that post type and use something like CMB2 to insert an image field and use the preiview_size option to specify how large you want the preview in the admin to appear. More details are here: https://github.com/CMB2/CMB2/wiki/Field-Types

Leave a reply

Your email address will not be published. Required fields are marked *