Change set featured image text in WordPress

It is easy to change the default ‘set featured image’ text in wordpress admin side.
Please add the following code in the function.php file in the theme folder

function custom_admin_post_thumbnail_html( $content ) {
    return $content = str_replace( __( 'Set featured image' ), __( 'Set default image' ), $content);
}
add_filter( 'admin_post_thumbnail_html', 'custom_admin_post_thumbnail_html' );

Now ‘Set featured image’ text will be changed to ‘Set default image’.

Leave a Comment