• Hi there,

    I love the plugin, been really helpful! One thing is that i’m trying to exclude the ipad so that it only uses the desktop theme on ipad (but switches to mobile on all other devices) – I’ve tried removing the ipad references from the ‘mobile-detector.php’ file but it still directs to the mobile theme when I visit through an ipad (even after clearing all cookies).

    Would really appreciate any help you can offer.

    Thanks in advance and kind regards,

    Andy

    https://www.ads-software.com/extend/plugins/mobile-detector/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter roohunt27

    (@roohunt27)

    Nobody got any idea how I can solve this? I really would prefer not to use another plugin as this is perfect except for this one thing… Please help!

    pixelkicks

    (@pixelkicks)

    I would also like to know if this is possible. I’m considering using this plugin but want to make sure it can do everything I need.

    HandsomeWeb

    (@handsomeweb)

    I am uninstalling this plugin because I need the iPad to show the full version of the site.

    Plugin Author Tubal

    (@tubal)

    I’m figuring out a way to give users the possibility to exclude certain mobile devices (iPad , other tablets, etc..) from being served the mobile theme.

    It’ll take me some days to implement because I’m quite busy right now but, no fear, it’ll be out in a few days.

    Tubal,

    I for one would be happy to pay for this plugin if it natively supported device exclusion.

    Until then, to anyone else interested, to exclude iPad from the plugin, change line 157 within the switch_theme function from…

    if ($options !== false && !empty($options['mobile_theme'])) {

    to

    if ($options !== false && !empty($options['mobile_theme']) && !self::is( 'ipad' )) {

    This leverages the native is() function and aborts the theme switch action if the current device is an iPad. You can replace ‘iPad’ with any of the other keys Tubal has made available for further conditioning if need be.

    Looking forward to an update with device exclusion!

    NOTE: To anyone editing the plugin, your update will be lost when the author releases a new version ??

    Thanks mate, just what i needed. Dev should include native device exclusion, i dont think it’s that complicated feature

    Thans LukeRollans

    Your post really helps me..

    I needed this functionality as well and tried this out. It works great!

    Thanks LukeRollans!

    You can use this class to detect tablet https://code.google.com/p/php-mobile-detect/

    include_once 'Mobile_Detect.php';
    
    $detect = new Mobile_Detect;
     if ($options !== false && !empty($options['mobile_theme']) && !$detect->isTablet()) {
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘ipad exclusion problem’ is closed to new replies.