Support

Account

Home Forums General Issues Output image depending on field selection Reply To: Output image depending on field selection

  • Sorry what I meant was, keeping the field as is so its a select field that returns a string of “red” or “white” and then using something like the below to replace “red” with the url of the image

    function my_acf_load_value( $value, $post_id, $field ) {
    if( is_string($value) ) {
    $value = str_replace( ‘Old Company Name’, ‘New Company Name’, $value );
    }
    return $value;
    }