iPhone Viewport Meta helps optimize your WordPress install for the iPhone and iPod Touch by inserting the meta viewport element into the head element of pages generated by WordPress.
Important: this plugin works best with themes derived from Sandbox (http://www.plaintxt.org/themes/sandbox/)
iPhone Viewport Meta does the following:
- if a request comes from an iPhone or iPod Touch it adds a meta tag and additional styles definitions to optimize content for that browser and it scrolls the location bar up and out of the way after the page loads
- it adds a template tag you can use in your theme to manage inclusion or exclusion of content
This plugin has no configuration settings.
This plugin defines a template tag that can be used to prevent generation of content such as sidebars, when viewed by iPhones and iPod Touch:
<?php if (!function_exists('weh_is_iPhone') || (function_exists('weh_is_iPhone') && !weh_is_iPhone())) : // don't send extra bits to iPhone ?> <?php get_sidebar() ?> <?php endif; // testing for iPhone ?><h3>Hooks/API</h3>
No hooks or APIs are defined by this plugin.
- This plugin works best with themes derived from Sandbox (http://www.plaintxt.org/themes/sandbox/)
- You will need to use the weh_is_iPhone() template tag to control the display of sidebars.
- This plugin depends on the user agent string sent by mobile Safari.
James Craig, http://cookiecrook.com/
Donny Cruce, http://yoshiki.tv/
iPhone and iPod Touch are trademarks of Apple, Inc.
I don’t have an iPhone or iPod Touch. How do I test my site?
You can add
forceiphone=y to the query string for any page on your WordPress site to force the iPhone behavior.