Switch theme for visitor on condition
-
I’m building a site with multiple sections and want a different theme used for each of these sections. I’ve added new taxonomy so that I do have definite sections now and I’ve got as far as the admin menu for my theme switcher. What I have is a list of Sections and a select menu to choose the theme from, it’s pretty rudimentary but it works just fine.
All I need to to find out how to switch the theme.
I don’t know how to get WP to make the decision to load up a different theme before the currently active theme and how to load up that theme without it changing the currently active theme on the admin side. (as what happened with switch_theme, and then everything broke)
essentially, I just want to know where to put my:
if ( $section == ‘whatiwasexpectingtohappen’ ):
changemythemeto( $section );
endif;(or however it will work)
I know it has something to do with add_action, or add_filter, or something but currently I’m just prodding around in the dark so any help would be fantastic.
- The topic ‘Switch theme for visitor on condition’ is closed to new replies.