Does this work with other mobile plugins

It would be advisable not to use other mobile theme switching functionality with this unless theme switching is turned off (go to Settings->Mobile Smart to disable).

This has been tested with the WordPress Mobile Pack transcoder and is noted to be compatible, though the list of mobile devices are different between the two.

How do I use the Manual Switcher?

You have the option of the following: * Mobile Smart Manual Switcher Widget – go to Appearance->Widgets and drop the widget in an appropriate sidebar. If you’re a theme developer, you can create a new ‘sidebar’ in the appropriate location, e.g. the footer bar, if you don’t want this option in the standard sidebar. * Enable Manual Switcher in footer – if this option is enabled (via the Options->Mobile Smart page), this adds the Manual Switcher link into the wp_footer() call, which means it will be displayed at the bottom of your page. * Template tag, see below:

<?php // get global instance of Mobile Smart class global $mobile_smart; // display manual switcher link - requires Manual Switching to be enabled $mobile_smart->addSwitcherLink(); ?>

The Manual Switcher displays the switcher link in a div with an id of mobilesmart_switcher

Do you do domain switching

Get the Mobile Smart Pro plugin for this functionality.

How do I enable unique handset body classes

To enable the CSS body classes, ensure that in your mobile theme you have the body_class() function included:

<?php body_class(); ?>

How do I change stylesheets dependent on device tier

How do I use the body classes?

If you have a style that you only want a specific tier of device (e.g. touch handsets like the iPhone) to use, then use the body class CSS selector in your CSS file as follows:

(Example:

/* for all links */ a { color: black;

}

/* increase padding on anchors on touch handsets to allow for big fingers .mobile-tier-touch li a { padding: 20px; }

How do I change stylesheets dependent on device tier

You would do this if you prefer to split out each device tier CSS into separate files. Be aware that this creates an extra function call though.

Use the following PHP code:

<?php /* add additional stylesheet for certain mobile types */
 global $mobile_smart;
// add stylesheets dependent on header
if ($mobile_smart->isTierTouch()) {
 wp_enqueue_style('mobile-touch', get_bloginfo('stylesheet_directory')."/css/touch.css");
}
else if ($mobile_smart->isTierSmartphone()) {
 wp_enqueue_style('mobile-smartphone', get_bloginfo('stylesheet_directory')."/css/smartphone.css");
}
?>

Note: these functions do not test for the Manual Switcher. To test for the manual switcher (in case you are using these template tag functions in a desktop theme), you should call:

<?php /* add additional stylesheet for certain mobile types */
global $mobile_smart;
// find out manual switching state
$is_manual_switched_to_mobile = $mobile_smart->switcher_isMobile();
?>

Can you add xxxx-device?

Please email me with details of the device that is not yet supported by Mobile Smart, and I will add it in, and endeavour to release an updated version within the week (if timescales allow).

I would like mobile-specific content

Get the Mobile Smart Pro plugin for this functionality.

Where can I get a mobile theme from?

If you’re a theme developer, you can start with the Mobile Smart boilerplat theme (included).

Alternatively, try the WordPress Mobile Pack for a good example of a theme that is compatible with XHTML-MP.

Or contact me and I can give you a quote for a custom theme.

 

 

Comments are closed.

Mobile Smart Pro

So much more:
  • Domain switching: redirect users to m.yoursite.com or switch theme when user arrives at m.yoursite.com (requires you to change some DNS settings)
  • Mobile Pages: mobile-specific content on the same edit screen as your main content
  • Mobile Menus: set up mobile-specific menus for simpler navigation
  • Mobile Plugins: disable selected plugins on a mobile site for speed and reduced functionality
  • Mobile Widgets: control which widgets are shown on your mobile site
Find out more »

Developer tools

Making life easier for mobile site developers:
  • Template functions: to help determine which tier of mobile device (touch/smartphone/other) is viewing your site, to allow conditional content inclusion.
  • CSS Selection: Adds device and tier specific CSS selectors to the body_class, to allow conditional CSS (e.g. so in the same way you have “.single” that you can target “.iphone” or “.mobile-tier-touch”.)
  • Boilerplate mobile theme: barebones theme to enable developers to create their own theme.

Features

  • Switch themes: Switch your theme to a mobile-ready theme if a mobile device is detected (all major devices supported)
  • Tablet or not: Choose whether to switch theme when viewing site with an iPad, Nexus 7 and other tablets.
  • "View full version of this site": allow your user to manually switch between desktop and mobile versions. Available in 3 versions: widget, option to automatically insert into footer, or template tag.
  • Simple image transcoding