• JiL

    (@rwa66)


    Hi all,

    I have website with a responsive theme that also looks good on mobile devices. The front page loads 200 excerpts with their featured image, which is fine for desktops.
    But of course mobile device users won’t be happy loading such a huge amount of data.
    Is there a way to show, for example, 10 articles to just the mobile visitors?

Viewing 2 replies - 1 through 2 (of 2 total)
  • David Choi

    (@wpthemes777)

    rajeev_rnd

    (@rajeevmatrix)

    you can also use the php mobile class to detect the device and after that you can apply the str function of php.
    of you can also use this code
    $iphone = strpos($_SERVER[‘HTTP_USER_AGENT’],”iPhone”);
    $android = strpos($_SERVER[‘HTTP_USER_AGENT’],”Android”);
    $palmpre = strpos($_SERVER[‘HTTP_USER_AGENT’],”webOS”);
    $berry = strpos($_SERVER[‘HTTP_USER_AGENT’],”BlackBerry”);
    $ipod = strpos($_SERVER[‘HTTP_USER_AGENT’],”iPod”);

    if ($iphone || $android || $palmpre || $ipod || $berry == true)
    { echo //your code ; }
    else { echo //your code;}

    I hope this can help you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘If mobile browser then show less posts?’ is closed to new replies.