Posted By

mdrisser on 12/28/09


Tagged

wordpress mobile


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

rickfu
jlan
Xtraboy
BrianCoyDesign
achilles283


Wordpress - Detecting Mobile Devices Accessing Your Site


 / Published in: PHP
 

URL: http://webdesignledger.com/tips/13-useful-code-snippets-for-wordpress-development

From Web Design Ledger "13 Useful Code Snippets for WordPress Development"

  1. include('mobile_device_detect.php');
  2. $mobile = mobile_device_detect();
  3.  
  4. if ($mobile==true) {
  5. // Edit this URL to point to the location you'd like to redirect to
  6. header( 'Location: http://your-website.com/?theme=Your_Mobile_Theme' ) ;
  7. }

Report this snippet  

You need to login to post a comment.