WordPress.org

Ready to get started?Download WordPress

Forums

WP Mobile Detector Mobile Plugin
Revert to Desktop (5 posts)

  1. Christina Lannen
    Member
    Posted 2 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
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 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
    Member
    Posted 2 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
    Member
    Posted 2 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.

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic