12/13/2016 - 11:50 AM

Detect Mobile Users

Detect Mobile Users

//* Do NOT include the opening php tag shown above. Copy the code shown below.

If you want to serve up something special to your mobile visitors you can use this snippet to find out when they have arrived on your website. To achieve this you have to visit and upload it to your theme directory. Place at the top of your header file. Make sure you edit line 5 of this to your own theme. 

$mobile = mobile_device_detect();

if ($mobile==true) {
  header( 'Location:' ) ;