Use Advanced Custom Fields (ACF) Image Field to Replace Featured Image

You can use Advanced Custom Fields (ACF) image field to replace the featured image field. In this example, I’ve created an image field for the company logo using the slug “company_logo”. This allows the client to complete an ACF form to add a new member company without having to know how to (or remember to) add a featured image. And in an archive of member companies, the logo field will display as the featured image.

Add the following code to your child theme’s function.php file:

//ACF Field Featured Image

function acf_set_featured_image( $value, $post_id, $field ){

if($value != ''){
//Add the value which is the image ID to the _thumbnail_id meta data for the current post
add_post_meta($post_id, '_thumbnail_id', $value);

return $value;

// acf/update_value/name={$company_logo} - filter for a specific field based on it's name
add_filter('acf/update_value/name=company_logo', 'acf_set_featured_image', 10, 3);