WordPress.org

Ready to get started?Download WordPress

Forums

WPtouch Mobile Plugin
How to Switch from mobile version to desktop version to a specific page (8 posts)

  1. Esteban Gallego
    Member
    Posted 1 year ago #

    I'm using Wptouch 1.9.6 free with WordPress 3.4.2 and when I change from mobile to a desktop site will go to the current page.

    My question is : how do I specify the exact page when I turn it off?

    example, if I'm in "about us page" and I want to make the Switch to desktop site I want to go to the "home page"

    http://www.elconelectric.com
    http://wordpress.org/plugin/wptouch

    http://wordpress.org/extend/plugins/wptouch/

  2. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Esteban Gallego
    Member
    Posted 1 year ago #

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

  4. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Charlie Strickler
    Member
    Posted 1 year ago #

    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?

  6. Charlie Strickler
    Member
    Posted 1 year ago #

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

  7. Charlie Strickler
    Member
    Posted 1 year ago #

    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="http://www.domainname.com?wptouch_switch=desktop&redirect=http://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 } ?>
  8. BraveNewCode Inc.
    Member
    Plugin Author

    Posted 1 year ago #

    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).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic