wp_is_mobile function

No, it will fail. There are literally thousands of mobile clients, and not all send a usable User-Agent header. There are better ways to adjust the site to small screens (which is not necessary the same as mobile!).

Use client side detection and offer a link to switch the view; save that option in a cookie.

I think the common misconception is that mobile == small screen. The Nexus 10 has more pixels than my big desktop screen, while my old laptop running a desktop Ubuntu shows just a 1024×768 pixels. Surface RT comes with 1366×768 pixels, a mouse (trackpad), a keyboard and a touch interface. And some UAs are just not detectable.

Which one will get the layout “optimized for mobile”?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)