I have used this code to change text of Featured images link :

function slider_change_featured_image_text( $content ) {
if ( 'twabc' === get_post_type() ) {
    $content = str_replace( 'Set featured image', __( 'Set Slider Image ', 'slider' ), $content );
    $content  .= ' <br/> <strong>Note :For better view , please upload image of size  2000 X 995.</strong> ';
    $content = str_replace( 'Remove featured image', __( 'Remove Slider Image', 'slider' ), $content );
return $content;
add_filter( 'admin_post_thumbnail_html', 'slider_change_featured_image_text' );

It works for Set featured image , but not working for Remove featured image. How can I do this ?

1 Answer 1


Excellent question as always @test.

Why don't you try with different casing?

Set Featured Image
Remove Featured Image

You may try also str_ireplace()

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.