ACF check if variable has http, if else return string
You must not return the value, but alter the varialbe $link if(strpos($link, ‘http://’) !== 0) { $link = ‘http://’ . $link; } //no else needed Be aware that if your link begins with https:// it will also prepend the http:// and result in http://https://example.com. The better way to do this would be from here, adjusted … Read more