I installed the IWPhone plugin from here. I haven’t tried to make the other content work in the plugin yet, just the Blog for now. Seems to be working just fine after some tweaks to my site-wide include files to special case the User-Agents. If you need to do something similar just add:
<?php
$container = $_SERVER['HTTP_USER_AGENT'];
$useragents = array (
“iPhone”,”iPod”);
$iphone = false;
foreach ( $useragents as $useragent ) {
if (eregi($useragent,$container)){
$iphone = true;
break;
}
}
if (!$iphone)
{ ?>
#insert conditional HTML here
<?php
} ?>
So for example, I have a site-wide header.php and footer.php that are not from wordpress. So I added this conditional to prevent my standard graphic header and footer from appearing on iPhones.
Read the complete article »
feed
