WordPress.org

Ready to get started?Download WordPress

Forums

Device Theme Switcher
[resolved] Compatibility with ProtoFluid? (3 posts)

  1. sarah97302
    Member
    Posted 2 years ago #

    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?

    http://wordpress.org/extend/plugins/device-theme-switcher/

  2. sarah97302
    Member
    Posted 2 years ago #

    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?

  3. James Mehorter
    Member
    Plugin Author

    Posted 2 years ago #

    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!

    James

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic