<?php /** * The Header for our theme. * * Displays all of the <head> section and everything up till <div id="main"> * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ global $is_iphone; if ( $is_iphone || $_GET['iam']=='testing' ) { include( STYLESHEETPATH . '/mobile/header.php' ); } else { include( STYLESHEETPATH . '/inc_header.php' ); } ?>
Basically, the proper way to use $is_iphone. This example uses it to call two different header.php include files, but it could be used to call different css files or different template files, or whatever, basically. inc_header.php is the default header.php for the site.