WordPress.org

Ready to get started?Download WordPress

Forums

Smooci (WordPress on Mobiles)
Full Website Link (1 post)

  1. fvillena
    Member
    Posted 2 years ago #

    You can give users on mobile devices the option of viewing your full fat website by adding the 3 statements below to the top of the function SMOOCI_verifyBrowser() just underneath $useragent = $_SERVER['HTTP_USER_AGENT'];

    if($_GET["desktop"] == "true")
    {
    $_SESSION['desktop'] = 'true';
    return "not mobile";
    }

    if($_GET["mobile"] == "true")
    {
    unset($_SESSION['desktop']);
    }

    if($_SESSION["desktop"] == "true")
    {
    return "not mobile";
    }

    Because WordPress doesn't support session values out of the box you will need to add the below code to the top of your wp-config.php file

    if (!session_id())
    session_start();

    When all that is done you simply add the link http://www.yourdomain.com/?desktop=true

    You can also use the link http://www.yourdomain.com/?mobile=true if you want to allow them to switch back.

    http://wordpress.org/extend/plugins/smooci-wordpress-on-mobiles/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic