Sometimes you just need two themes – one for non-mobile, one for mobile. A simple plugin to enable this is Mobile Theme Switch by Jonas Vorwerk. In my case, though, I didn’t want any chance of the plugin being disabled or someone accidentaly selecting the wrong theme (the plugin has an admin screen where you select the mobile theme from your active themes). So I copied the core of the plugin into my already-active core functionality plugin. You could also add this to your theme’s functions.php file:
Replace my-mobile-theme in line 43 with the name of your mobile theme’s directory (inside wp-content/themes).
The next thing you need to do is to place the links in the footer of both themes to enable the switching. In your mobile theme, you would add a link that looks like this:
<a href="/?mobile=off">View Non-mobile Site</a>
If you use the Genesis framework, in your theme’s functions.php file, you can add this code to place the link in your footer:
One last step – in the non-mobile theme, you’ll need to add a link for mobile users to be able to switch back. We don’t want this link to show up on desktop browsers, though, so we wrap it with the wp_is_mobile() function. In your footer, you’ll add this code:
For Genesis users, this would work: