Viewing 7 replies - 1 through 7 (of 7 total)
  • The purpose of the switch is to enable your desktop theme to be viewed on mobile devices and vice-versa. It does not really handle url redirection and, to do so would likely cause user confusion.

    Is there a particular reason you want to accomplish this? Perhaps the WPtouch Home Page option will give you the experience you’re looking for your visitors in terms of seeing a different home page on mobile devices.

    Thread Starter Esteban Gallego

    (@derbyseo)

    I have a different home page when it comes to a mobile site (https://www.elconelectric.com/mobile), then to make the switch to desktop site want to go to (https://www.elconelectric.com)

    WPtouch allows you to set a custom home page just for your mobile theme. The setting is at Home Page Re-Direction > Home Page Re-Direction. There is no need for a different mobile homepage url.

    Charlie Strickler

    (@charliestricklergmailcom)

    Hi, I really like how turning off the mobile theme will keep you on the same URL. Because WordPress home pages are often made up of widget areas and content sliders we usually make a separate page in WordPress to use for the WP Touch home page.

    Is there anyway I can have the “Off” button remain on the same URL with the exception of the mobile home page which would redirect to the normal site home page?

    Charlie Strickler

    (@charliestricklergmailcom)

    I am using WP Touch Pro (which I love) and the site I am working on is https://www.rolloffdumpsterdirect.com

    Charlie Strickler

    (@charliestricklergmailcom)

    Here is the code I used in my footer.php for my WP Touch child theme. I set WP touch to direct to the same URL. You should replace 1776 with the page ID of your mobile home page and you should replace domainname.com with your home page URL or the URL you want your mobile home page redirect to when the mobile theme is disabled.

    <?php if ( is_page( 1776 ) ) { ?>
    <div title="https://www.domainname.com?wptouch_switch=desktop&redirect=https://www.domainname.com">
    <span class="on active" role="button"></span>
    <span class="off" role="button"></span>
    </div>
    
    <?php } else { ?>
    
    <div title="<?php wptouch_the_mobile_switch_link(); ?>">
    <span class="on active" role="button"></span>
    <span class="off" role="button"></span>
    </div>
    <?php } ?>

    Is there anyway I can have the “Off” button remain on the same URL with the exception of the mobile home page which would redirect to the normal site home page?

    WPtouch serves a mobile theme to your same urls. It does not redirect (except in the case where you’ve specified it to use a different url for your mobile homepage).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to Switch from mobile version to desktop version to a specific page’ is closed to new replies.