How to remove "http://" When Echoing URL?
I'm seeking to echo the domain name (url) without the 'http://' (or 'https://').
I've created the following:
?php $surl = bloginfo('url'); $findh = array( 'http://' ); $replace = ''; $outputh = str_replace( $findh, $replace, $surl ); echo $outputh; ?
also another one (of many) I tried:
?php $surl = bloginfo('url'); echo str_replace('http://', '', $surl); ?
Seems like a simple task, but output still includes the 'http://' when the domain is echo'd. Reviewed other posts here and other sites to no avail. Perhaps something within Wordpress base files is interfering, not sure on this one.
Thanks in advance for any feedback!