How to Switch Between Mobile and Desktop View with a Responsive Theme

If your website has a responsive theme it will automatically re-size elements to fit different screen sizes.  Unfortunately, many WordPress responsive themes do not come with the ability to view the desktop version on a mobile phone.  To add this capability, you will need to upload a javascript file, reference it in between your <head><script src=”scripts/responsive-switch.min.js”></script></head> tags and add the following code where you want the link switch.

<a href=”#”
data-link-desktop=”Switch to desktop version”
data-link-responsive=”Switch to responsive / mobile version”

You will need to view your website on a mobile device to see the link.  “The “Responsive Switch” link is only visible when it is needed. This means that by default, it is only visible when the screen or window size is less than 1024px.”

Click here to download the javascript file.

For more details, please visit: