Skip to content

IsMobile 📱

Go Back

Shortcode that shows or hides the content depending on the device, its brand, or the OS viewing the content. Works using Mobile Detect Library.

Examples:

[ismobile device='phone']Mobile Phone Content[/ismobile]
[ismobile device='desktop,tablet']Desktop/Tablet Content[/ismobile]

Parameters

device: Filters the device where you want the content to be shown.
It could be more than one device, simply separate them with a comma.

Values

  • android: Shows content on Android devices.
  • chrome: Shows content on Chrome browser (Only works on mobile devices).
  • desktop: Shows content on a computer. Opposite to mobile option.
  • ios: Shows content on iOS devices.
  • ipad: Shows content on an iPad.
  • iphone: Shows content on an iPhone.
  • mobile: Shows content on a mobile device (including tablets and cell phones). Opposite to desktop option.
  • phone: Shows content on a cell phone.
  • safari: Shows content on Safari browser (Only works on mobile devices).
  • samsung: Shows content on Samsung devices.
  • tablet: Shows content on a tablet.

Go Back