Title: Device = True
Last modified: August 20, 2016

---

# Device = True

 *  Resolved [hioolen](https://wordpress.org/support/users/hioolen/)
 * (@hioolen)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/device-true/)
 * Is there a line of code i can use to check whether or not the user is mobile?
   
   Switching works great, but in some instances i want my users redirected to alternative
   content. By using “if mobile true ” i could do just that.
 * [http://wordpress.org/extend/plugins/device-theme-switcher/](http://wordpress.org/extend/plugins/device-theme-switcher/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/device-true/#post-3249644)
 * Hi hioolen,
 * Currently that type of function does not exist in the plugin. Though, I can certainly
   see the benefits of having a few conditional functions for just that use. I’ll
   think on it and be back in touch with my thoughts. Thanks for your feedback!
 * In the meantime you could always use the MobileESP library that the plugin uses..
   Check out their website, it’s a fairly easy library to work with. Hope that helps!
 *  [zonerdck](https://wordpress.org/support/users/zonerdck/)
 * (@zonerdck)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/device-true/#post-3249692)
 * You could also uses wp_get_theme(); to make a conditional statement based on 
   the theme being used.
 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/device-true/#post-3249694)
 * Hi hioolen – I know it’s been quite a while since you posted this, but I wanted
   to let you know the upcoming v1.9 release will include a method for you to check
   the current device in your theme. Coming soon!
 *  Plugin Author [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * (@jamesmehorter)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/device-true/#post-3249698)
 * As of Device Theme Switcher 2.0 you can tap into the global $dts object to check
   which device the current visitor is using. Have a look here: [http://wordpress.org/plugins/device-theme-switcher/installation/](http://wordpress.org/plugins/device-theme-switcher/installation/)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Device = True’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/device-theme-switcher_b8a362.svg)
 * [Plugin Name: Device Theme Switcher](https://wordpress.org/plugins/device-theme-switcher/)
 * [Support Threads](https://wordpress.org/support/plugin/device-theme-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/device-theme-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/device-theme-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/device-theme-switcher/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [James Mehorter](https://wordpress.org/support/users/jamesmehorter/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/device-true/#post-3249698)
 * Status: resolved