If you have your own install of WordPress, it's easy to make an iPhone-optimized theme for your blog -- without changing anything for non-iPhone users. This info might be useful for anyone building web sites with other tools as well. Here are the quickie instructions:
- Make a unique stylesheet, styles-iphone.css, ditching the stuff you don't need, and setting div widths to 320.
- Add this to the header.php file in your theme:
<?php $iphone_stylesheet = str_replace(".css", "_iphone.css", get_bloginfo('stylesheet_url')); ?> <link media="only screen and (max-device-width: 480px)" href="<?php echo $iphone_stylesheet; ?>" type="text/css" rel="stylesheet" /> <?php if (strstr($_SERVER['HTTP_USER_AGENT'], "iPhone")) { echo ‘<meta name="viewport" content="width = 320″ />'; } ?>
•
[18,326 views]

