WordPress.org

Ready to get started?Download WordPress

Forums

Mobile Device Detection by 51Degrees
[resolved] Force desktop site (4 posts)

  1. wilfred45
    Member
    Posted 1 year ago #

    I'm using this plugin and it works great.

    But: is it possible to add a button on my mobile site and redirect mobile users to my desktop site?

    Thanks

    http://wordpress.org/extend/plugins/51degreesmobi/

  2. 51Degrees.mobi
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. mrusselr
    Member
    Posted 1 year ago #

    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.

  4. 51Degrees.mobi
    Member
    Plugin Author

    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.