[is_desktop]You are Using a Mobile Device[/is_desktop]
This shortcode allows you to display content specifically for desktop users, and optionally show alternative content to mobile visitors.
Parameters
- default – (accepts: text) – Content to display if the visitor is not using a desktop device (optional)
- exclude – (accepts: comma-separated text) – Hides content for specific locations (continent, country, region, or city)
- include – (accepts: comma-separated text) – Displays content only for specific locations
- cache – (no value) – Enables AJAX-based caching. This parameter is automatically applied if cache setting is enabled
Return
Displays the wrapped content only if the visitor is using a desktop device. If not, it returns the default
content (if defined).
Examples
Display a custom message for desktop visitors:
[is_desktop default="You are Using a Mobile Device"]You are Using a Desktop Device[/is_desktop]
Returns:
You are Using a Desktop Device