Return to Snippet

Revision: 21993
at December 28, 2009 11:29 by mdrisser


Initial Code
include('mobile_device_detect.php');
$mobile = mobile_device_detect();

if ($mobile==true) {
    // Edit this URL to point to the location you'd like to redirect to
    header( 'Location: http://your-website.com/?theme=Your_Mobile_Theme' ) ;
}

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

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

Initial Title
Wordpress - Detecting Mobile Devices Accessing Your Site

Initial Tags
wordpress, mobile

Initial Language
PHP