Programmatically Selecting Theme Based on URL
The activated theme is stored in the options table: template is the parent theme, stylesheet is the child theme. If there is no child theme the two values will be the same. The current hostname (URL without protocol or path) is available in the $_SERVER variable. You can then hook into the stylesheet and template … Read more