Well, I'm editing WP theme and creating network so I need to get url and modificate it for use in <a></a>
tags.
I created function called urlbg(); and on normal domain (like www.xyz.com) it works but in subdomain it don't work.
I called functions in <a></a>
tags like so:
<a href="'. urlbg( 'ark') . '" title="ARK: Survival Evolved"><img src="'. content_url() .'/themes/newsgamer/images/ark.png"></a>
Problem is, in normal domain (like www.xyz.com) when i use functions eg. urlbg( 'ASD' ); i get ASD.xyz.com and thats what i want, BUT in other way when i use the same code in subdomain (like foo.xyz.com) and when i called function in urlbg( 'ASD' );<a></a>
tags, i get foo.xyz.com/ASD. (but need ASD.xyz.com ).
Sorry for my bad English I hope you'll understand me and know whats my problem.
Code of function urlbg();
function urlbg($prefix){
$siteUrl = get_site_url();
$url = str_replace("http://", "https://", "". $prefix . ".", $siteUrl);
return $url;
}