Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter glepage

    (@glepage)

    function mobile_redirect() {
    global $is_mobile;
    if ( $is_mobile ) {
    // replace URL_TO_MOBILE_SITE with your site’s mobile URL i.e. https://mobile.example.com
    header( ‘Location: URL_TO_MOBILE_SITE’ );
    exit;
    }
    }
    add_action(‘after_setup_theme’, ‘mobile_redirect’);

    You should think about using a responsive theme. They’re much easier to handle than a separate mobile plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mobile Landing Page, then back to Theme’ is closed to new replies.