WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Device Theme Switcher

Set a separate theme for handheld and tablet devices under Appearance > Device Themes

Which devices are considered 'handheld' and which are 'tablet'?

'Handheld' devices include Android, BlackBerry, iPod, iPhone, Windows Mobile, and other various 'hand held' smart phones. 'Tablet' devices include iPad, Android tablets, Kindle Fire and other large-screen hand helds. 'Low Support' devices include those which have poor CSS & Javascript rendering capabilities-often these are older devices.

Are WordPress child themes supported?

Yes!

Help!? My theme isn't working!

If your theme does not work as expected on any of the devices-the issue is with the theme, NOT with the plugin! Follow typical WordPress debugging practices to find and correct the issue in your theme (Or possibly another plugin). The only theme-requirement this plugin relies on is that you have properly-written WordPress themes. If your theme activates in Appearance > Themes and you can preview the theme in your computer's browser-then it is 'properly-written' as far as Device Theme Switcher is concerned.

How do Menus and Widgets work?!

All Device Theme Switcher really does is change which theme is delivered to the visitor based on the deivce they're using-but WordPress still thinks the active theme is 'active' the whole time. This means you need to have your register_nav_menu() or register_widget() functions in all your themes! See below for details and examples.

How do I show the same menu in each theme?

Simply place you register_nav_menu('my-menu-location', 'My Menu Location Name'); function in both of your primary/active and handheld/tablet theme functions.php files. Then, while your primary theme is 'active' go into Appearance > Menus-create your menu and assign it to the menu location-and populate it with some menu items. That's it!

How do I show one menu in my active theme and a different menu in my handheld/tablet theme?

Register a menu location for each theme, and place your register_nav_menus() code in each theme. E.g.:

In each theme's functions.php file:

register_nav_menus(array(
    'active-menu-location' => 'Active Theme Menu Location',
    'handheld-menu-location' => 'Handheld Theme Menu Location',
    'tablet-menu-location' => 'Tablet Theme Menu Location',
));

Then, while your primary theme is 'active' go into Appearance > Menus-create your 3 menus-assign each one to their designated menu location-and populate each with some menu items.

Lastly we just need to display each menu in each theme:

Active theme header.php:

wp_nav_menu(array('theme_location' => 'active-menu-location'));

Handheld theme header.php

wp_nav_menu(array('theme_location' => 'handheld-menu-location'));

Tablet theme header.php

wp_nav_menu(array('theme_location' => 'tablet-menu-location'));

That's it-the important part is that you register each location in each theme!

How can I display the same sidebar in each theme?

Place the same register_sidebar() function in each theme's functions.php file, and add your widgets to your sidebar while the primary theme is 'active'.

How can I display a different sidebar in each theme?

Place the same 3 register_sidebar() functions in each theme's functions.php file, and add your widgets to each sidebar while the primary theme is 'active'. E.g:

In each theme's functions.php file:

register_sidebar(array('name' => 'Active Theme Sidebar'));
register_sidebar(array('name' => 'Handheld Theme Sidebar'));
register_sidebar(array('name' => 'Tablet Theme Sidebar'));

Then, while your primary theme is 'active' go into Appearance > Widgets-and assign some widgets to each sidebar. Lastly we just need to display each sidebar in each theme:

Active theme page.php:

dynamic_sidebar('Active Theme Sidebar');

Handheld theme page.php

dynamic_sidebar('Handheld Theme Sidebar');

Tablet theme page.php

dynamic_sidebar('Tablet Theme Sidebar');

Requires: 3.0 or higher
Compatible up to: 3.9.1
Last Updated: 2014-5-18
Downloads: 27,883

Ratings

5 stars
5 out of 5 stars

Support

3 of 4 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,4,4
100,1,1
100,1,1
100,2,2 100,2,2
100,1,1 100,1,1
100,2,2
100,3,3
100,1,1
100,3,3
100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1