Mobile Shortcodes – nested shortcodes?
-
I was thrilled to find your plugin, especially with its mobile shortcodes:
is_mobile: [is_mobile]some mobile-only content[/is_mobile]
is_tablet: [is_tablet]some tablet-only content[/is_tablet]
is_desktop: [is_desktop]some desktop-only content[/is_desktop]I want to display one set of content just to phones, and another set of content to ALL OTHER DEVICES (tablet, laptop, pc). How can I accomplish this without having 3 sets of content? Can I nest shortcodes as follows?:
[is_mobile] <– mobile content –> [is_mobile]
[is_desktop][is_tablet] <– content for all other –> [/is_tablet][/is_desktop]
If not, I suppose I can just duplicate the “all other devices” content and wrap it in the appropriate shortcode.
May I suggest adding another shortcode: [is_not_phone]?
Thanks, Jeff Guynn
- The topic ‘Mobile Shortcodes – nested shortcodes?’ is closed to new replies.