Support » Plugin: Plugin Name: Device Theme Switcher » [Plugin: Device Theme Switcher] Compatibility with ProtoFluid?

  • Resolved sarah97302


    I would like to be able to use protoFluid during development to work on CSS for handheld and tablet themes. But I’ve always done this in the past with a media query: @media only screen and (max-width: 480px), only screen and (max-device-width: 480px) — the max-width allows protoFluid to display the mobile site because of the narrow viewport window, and then I can use FireBug to fix the CSS.

    Since this plugin uses User Agent detection rather than viewport width, protoFluid won’t load the handheld or tablet themes. Is there any kind of temporary hack I could use with this plugin just during development to get protoFluid to trigger the theme switch based on viewport width, and then remove it once the site goes live?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I figured out a partial workaround for this: by putting the link to the mobile site in the main template

    <?php if (class_exists(‘Device_Theme_Switcher’)) : Device_Theme_Switcher::generate_link_back_to_mobile(); endif; ?>

    I can manually switch to the mobile site and edit css that way.

    Is there a way I can add a manual link to the tablet theme?

    Plugin Author James Mehorter


    Hi Sarah,

    You’re correct, there is currently no way to ‘spoof’ the user agent with this plugin. E.g. there is no way at this time to display a link to view the handheld or tablet theme via the plugin while using a normal screen computer. I’ve been looking at implementing a feature like this, though there is no eta yet.

    As a simple solution, disable the Device Theme Switcher plugin, and set your custom handheld theme as your primary theme for your WordPress site. So when you visit the site on the dev server you’ll see the handheld version. Once you’re happy with it, set your default theme back, enable the plugin, set your handheld theme in the plugin, and give it a try on a few devices.

    Hope this helps!


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Device Theme Switcher] Compatibility with ProtoFluid?’ is closed to new replies.