How do I get sub-domain name?
-
First off I am still wet behind ears with WP so if this has been answered somewhere else, or is contained in the API, then my search terminology is off.
I am able to get the blog name for the parent/super blog, but how do I get the name for the sub-domain hosted site? I should qualify ‘name’.
https://arresteddecay.com <= I can get “arresteddecay.com”
https://trevor.arresteddecay.com <= I can not get the “trevor” part.The end purpose is to custom a stylesheet based on the actual sub-domain name. Not the user, not the title in the URL, but the sub-domain name. As this is dynamic, I will not have the sub-domain based site’s ID unless I can grab this automatically. I am sure I can create a theme function, but if WP has something in place, why not use it? ??
- The topic ‘How do I get sub-domain name?’ is closed to new replies.