WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Stein Mobile Switcher

The Stein Mobile Switcher detects which device (e.g. Smartphone, iPhone, Tablet) your visitor is using and enables a theme you specified.

How can I add Links to the other device-versions in my templates?

Use the following functions to do that:

  • sms_link_to_site($visibility = 'all', $target='full', $text = '') - Shows the "target"-Template

$visibility is the entry device of the visitor. Possible values are "all", "mobile", "iphone" and "tablet". E.g. if you want a link to the normal template to be visible only to smartphone users:

<?php sms_link_to_site('mobile', 'full'); ?>

You can also use OR:

<?php sms_link_to_site('mobile|tablet|iphone', 'full'); ?>

$target specifies the Target-Template. Possible values are:

  1. tablet - Link to the Tablet-Site,
  2. iphone - Link to the iPhone/iPod-Site,
  3. mobile - Link to the Smartphone-Site,
  4. full - Link to the normal Site

$text is the displayed link text.

Example usage:

<?php
  if( function_exists('sms_link_to_site') ) { sms_link_to_site("mobile|tablet|iphone", "full", "Check out the full website!"); }
?>

How can I style the Links?

The links have a class equally to the functions name and target: class="sms_link_to_site_TARGET" (e.g. "sms_link_to_site_mobile"). Just style them with regular CSS.

Requires: 3.4.2 or higher
Compatible up to: 3.4.2
Last Updated: 2012-10-29
Downloads: 1,200

Ratings

4 stars
4 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1