I want to add a little conditional logic to vary the header of the theme according to the subdomain. Is there a neat way of getting the current subdomain?
WP Hive » Troubleshooting and How-To
How to use subdomain for template conditional logic?
(2 posts)-
Posted 3 years ago #
-
get_bloginfo('url') will get the site's url. It should show up as 'http://sub.domain.com'. You're code might look something like
?php
$url = get_bloginfo('url');
if ($url == 'something' {
do something
} else {
do something else
}
?>(I left the first '<' off since I have no idea if the forum would try to parse PHP or not :)
Posted 3 years ago #
Reply
You must log in to post.
