• Resolved bnafz

    (@bnafz)


    Hi,

    This plugin is awesome and works perfectly!!

    Quick question though…I’m using this plugin to display a mobile website to users. I want to have a link that says “View Full Website” (which is the desktop theme). Is there an easy way to switch back to the desktop theme by clicking a link while on a mobile device?

    Thank you so much for the help!

    https://www.ads-software.com/plugins/device-theme-switcher/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author James Mehorter

    (@jamesmehorter)

    You have two options:

    1) Display the link with our widget. In Appearance > Widgets you can add the ‘Display Full Website’ widget to one of your sidebars. There are notes on using widgets in your themes in our FAQ.

    OR

    2) Display the link with PHP in your theme files:

    global $dts;
    echo $dts->build_html_link( 'active', 'View Full Website', array(), true );

    I’m learning now that I need to add this question to our FAQ. And also create an easier helper function for the link. I’ll work on those items for our v3.1 release. Thanks!

    Thread Starter bnafz

    (@bnafz)

    Blah (facepalm)…

    Sorry, I didn’t even think about looking within the widgets area.

    Thank you for the quick response!

    Plugin Author James Mehorter

    (@jamesmehorter)

    Hi again,

    Here is a revised/cleaner way to use PHP to make the links. There are two PHP functions at your disposal:

    <?php link_to_full_website(); ?>

    and

    <?php link_back_to_device(); ?>

    Place them in whichever theme you want and where ever makes the most sense for your site. For example, you might put link_to_full_website() in the footer of the mobile theme in medium-size text, and link_back_to_device() in the header of your desktop/active theme in larger text size.

    The links will only display for mobile users ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Link to switch back to desktop theme?’ is closed to new replies.