adding a “switch to desktop site” button in responsive theme..on wordpress website

how do i go about doing it?

there is one solution that i thought would work..
my theme allows me to turn of responsive design..
i copied the whole theme folder and renamed it to theme-mobile..
so now i have 2 exact same themes but with different names..i go in theme settings and turn of responsive design on one of the themes..
then i tried to use this plugin to switch theme when someone is using mobile device

Read More

but the problem is even if i have two themes they share the settings..if i turn off responsiveness on one theme..the other one gets turned off too..
any help would be really appreciated..

Related posts

Leave a Reply

2 comments

  1. There is a javascript fix using JQuery.

    here is some pseudo code

    LINK.onclick .find "<meta name="viewport" content="width=device-width">" .replace ""
    

    essentially you javascript will listen for the event of a mouse click on your view desktop link it will search the DOM for some html that should be something like which is what make the site responsive on a mobile (you would still need the stylesheets) upon finding that bit of html it would replace it with a blank string so the site is no long mobile responsive. (it would still appear responsive in desktop browsers as you scale them)