I found some plugins like WP Mobile Pack, but I want to put together my own very simple theme switcher. (Just don't want any bloat.)
I have a regular WordPress theme and I also created a WordPress Mobile theme as well. These are both standard WP themes that can be activated in the dashboard.
How can I direct certain user agents directly to the mobile theme? (I don't want a mobile domain, sub-domain, or trailing directory.) www.example.com should be the domain for any visitor.
The one catch is, I also want to offer a link to let users switch back. For instance, iOS devices should go to the Mobile Theme. But if they are on the large iPad, they may want to simply use the regular site. Having some sort of cookie override the default .htaccess or PHP redirection would be useful.
Any help, specifically targeted at WP and handling WP theme switching would be truly appreciated.