[is_mobile]

[is_mobile]You are Using a Mobile Device[/is_mobile]

With this Geo Controller shortcode you can display a different message for desktop or mobile users.

Parameters

default – (accept: text) – This will be returned if the user is not a mobile visitor. (optional)

exclude – (accept: comma separated text) – this parameter gives to shortcode new functionality. If you wrap some content with shortcode and add this parameter with continent, country, region, city name or code, it will hide that content from that setup locations.

include – (accept: comma separated text) – this parameter gives to shortcode new functionality. If you wrap some content with shortcode and add this parameter with continent, country, region, city name or code, it will show that content from that setup locations.

cache – (no values) – This is single property with no values. It was used for the cache support that forcing AJAX requests to get proper geo information. This shortcode can be also automatically added if cache setting is enabled.

Return

This option shows or hides content depending on whether the user is using a mobile or desktop device.

Examples

Display custom message:

[is_mobile default="You are Using a Desktop Device"]You are Using a Mobile Device[/is_mobile]

Returns: You are Using a Desktop Device

Was this page helpful?