This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

iPhone Viewport Meta


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 (


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.

Template Tags

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.

Known Issues

  • This plugin works best with themes derived from 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,
Donny Cruce,

Anything else?

iPhone and iPod Touch are trademarks of Apple, Inc.

–Bill Humphries


  1. Download the plugin archive and expand it (you’ve likely already done this).
  2. Put the ‘iphone-viewport-meta.php’ file into your wp-content/plugins/ directory.
  3. Go to the Plugins page in your WordPress Administration area and click ‘Activate’ for iphone viewport meta.


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.

Contributors & Developers

“iPhone Viewport Meta” is open source software. The following people have contributed to this plugin.


Translate “iPhone Viewport Meta” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.