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

  1. fvillena
    Posted 4 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")

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

    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic