I’d like to be able to set a wordpress theme for certain subdomains, but still load the same content for all installations.
For example, I have www.domain.com that loads the default template with default content. I’d also like to have mobile.domain.com, that too loads the same content but a separate template.
What would be the best way to go about this?
Without more detail about the kind of template you’d be serving up, the best I can advise is that you can use the ‘template_redirect’ hook to override the entire Template Hierarchy.
A more delicate way to do this would be by using on of the more specific filters. Each of the conditional get_*_template() functions in template-loader.php has a filter of its own which you can use to return your own template name. Look in includes/themes.php to see those filters.
Most of them end up using get_query_template(), which dynamically creates the filter name in a consistant way, but some of the others like author and category are separate – look around to find which if any suits you best under different circumstances.