WP Mobile Detector
Revert to Desktop (5 posts)

  1. Christina Lannen
    Posted 4 years ago #

    Is there anyway to revert to the desktop version? I have the mobile setup the way the client wants, but they want a link so that a visitor, if they choose, can see the full site.

  2. websitezcom
    Plugin Author

    Posted 4 years ago #

    As long as you're using the "wp_footer()" function in the footer, it should automatically insert a link for you.

    You'll also need to use the "wp_head()" function as well because it inserts javascript.

  3. jtrost
    Posted 4 years ago #

    Is there a link that I can place directly in my code for this and to switch to the mobile version? I am building a custom mobile layout.

  4. jtrost
    Posted 4 years ago #

    It seems this plugin uses cookies to set mobile/desktop sites, which seems kind of complicated. Here's what I have come up with, but it seems to only work on mobile devices:

    In functions.php, add:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    Then where you want the links to appear, enter:
    <a href="#" onclick="javascript:setFullSite();">Go to Desktop Site</a><br /><a href="#" onclick="javascript:setMobileSite();">Go to Mobile Site</a>

    Again, this only works on mobile devices. Trying to click the links in Firefox/Chrome just reloads the desktop site.

  5. servoweb
    Posted 4 years ago #

    hey jtrost,

    can you try reposting that functions.php edit using pastebin?

    sounds like your solution just might work for my needs, but your code has been moderated.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic