Skip to content
Sign in

Mobily – Mobile Theme Switcher

Show a separate theme on iPhone, iPad, Android and other mobile devices – with a visitor switch link, shortcode and block.

Not scanned yet WordPress plugin 10 installs

Install in

No install steps yet

Follow the steps on the source page.

Mobily serves a different theme to mobile visitors while desktop visitors keep your active theme. Pick a theme for each device class – or leave it at “Same as desktop”.

Features

  • Theme per device: iPhone & iPod touch, iPad, Android phones, Android tablets and all other mobile devices (Kindle, Opera Mini, BlackBerry, …).
  • Classic and block themes are supported. Every theme keeps its own menus, widgets, Customizer settings and global styles.
  • Visitor switch: visitors can change between the mobile and the desktop version. Their choice is remembered in a cookie (lifetime configurable).
  • Block “Theme Switch Link” for posts, pages and block theme templates, plus the classic shortcode [wp_mobily_shorter].
  • Preview each device theme as an administrator without affecting visitors.
  • Cache-safe: optional Vary: User-Agent, Cookie header; pages shown because of a visitor choice are never cached.
  • Safe by design: the admin area, REST API, AJAX, cron, the login page and the Customizer always use the desktop theme.
  • Abilities API: read-only ability wp-mobily/get-theme-for-user-agent tells AI assistants, MCP clients and scripts which theme a user agent gets (requires the switch_themes capability).
  • Modern code base for PHP 8.3+ – lightweight, no external requests, no tracking, no ads.

Switch links

  • ?mobily_wp_theme_layout=mobile – show the mobile theme
  • ?mobily_wp_theme_layout=desktop – show the desktop theme
  • ?mobily_wp_theme_layout=auto – forget the choice and detect the device again

The values mobily and orginal of older versions still work.

For developers

  • Filter mobily_detected_device – change the detected device (iphone, ipad, android, android_tablet, mobile or empty for desktop).
  • Filter mobily_target_theme – change the stylesheet served to the current visitor.
  • Ability wp-mobily/get-theme-for-user-agent – input user_agent (and optional layout: auto, mobile, desktop), output device, device_label, theme_slug, theme_name, is_mobile_theme:

    wp_get_ability( ‘wp-mobily/get-theme-for-user-agent’ )->execute( array( ‘user_agent’ => $ua ) );

Privacy

Mobily does not store personal data, does not contact external services and does not track visitors. If a visitor uses the switch link, a functional cookie (mobily_wp_theme_layout) remembers the choice. A suggested text for your privacy policy is added under Settings › Privacy.

Written by Joobi from the project's own listing. See the source page

androidipadmobilemobile themeTheme Switcher
27 Nov 2026
Version 5.0.0 released. Not scanned yet.

5.0.0

  • Renamed from WP-Mobily to Mobily – Mobile Theme Switcher (slug, shortcode, links and settings stay the same).
  • Complete rewrite for WordPress 7.0+ and PHP 8.3+ (tested with PHP 8.3, 8.4, 8.5 and WordPress 7.1): strict types, enums, readonly value objects, own autoloader.
  • New: Abilities API integration – read-only ability “Get theme for a user agent”.
  • New: “Other mobile devices” class, Android tablets and phones handled separately.
  • New: block “Theme Switch Link”, shortcode attributes mobile_text, desktop_text, class.
  • New: administrator preview per device, configurable cookie lifetime, optional Vary header, reset link (?mobily_wp_theme_layout=auto).
  • New: settings page with a modern card layout.
  • New: each mobile theme uses its own theme mods, menus and widgets.
  • Fixed: switch links of older versions did not work reliably (mobile vs. mobily), link texts could not be saved, PHP 8 warnings.
  • Fixed: the mobile theme was also loaded in the admin area, REST API and AJAX requests.
  • Security: all input is validated against whitelists, all output is escaped, the cookie is HttpOnly, SameSite=Lax and Secure on HTTPS.
  • Security: responses that depend on the visitor’s choice or a preview are marked as private/no-store and excluded from page caches (prevents cache poisoning).
  • Removed deprecated WordPress functions (get_themes, get_current_theme).

4.0

  • Tested with WordPress 5.6.

3.1

  • Tested with WordPress 4.9.4.

2.0

  • Fixed a query bug, tested with WordPress 4.4.

1.0

  • First release.
19 Aug 2013Listed on Joobi from WordPress.org.

Follow this listing's changes (Atom feed)