WordPress.org

Support

Support » Plugins and Hacks » Mobile Device Detection by 51Degrees » [Resolved] Force desktop site

[Resolved] Force desktop site

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author 51Degrees.mobi

    @51degrees

    Hi, Thanks for the support.

    The switcher can be disabled by setting a session variable called NO_SWITCH to true:

    $_SESSION['NO_SWITCH'] = TRUE; // no switching will occur

    I hope this is useful to you. We’d love to hear any feedback that could be used to improve the plugin.

    Thanks,
    Tom

    Hi, sorry I know this is resolved, but I’m having the same issue. The $_SESSION[‘NO_SWITCH’] = TRUE; does not seem to be working and the site is still looping back to the mobile URL.

    Where is the best place to put $_SESSION[‘NO_SWITCH’] = TRUE; in the code to stop a redirect if you want to view the full site.

    Thanks.

    Plugin Author 51Degrees.mobi

    @51degrees

    WordPress code (and therefore 51Degrees code) runs before the page code loads, so there’s a good chance that a redirection has already been scheduled before your switch is set. After your switch is set try redirecting to the page to you desktop site again. You can see a working implementation in the Wave theme bundles with the plugin.

    Thanks,
    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Force desktop site’ is closed to new replies.
Skip to toolbar