DEAL ENDS IN:

HALLOWEEN SALE!

UP TO 40% OFF!

GET IT NOW

MISC
  • Home
  • Multiple (and/or) conditions

Multiple (and/or) conditions

Though the option to display a dynamic version based on multiple conditions is not built into the plugin interface, the same result can be achieved by nesting shortcodes. ie. creating a trigger and pasting its shortcode within a dynamic version content field of another.

Example:

Let’s assume you want to display a Click to Call button during your business’ opening hours and only for mobile users.

  1. Create the first trigger, set the dynamic version with a Schedule condition, and enter the Click to Call button in the version content field.
  2. Create a second trigger with Device Type = Mobile condition, and paste the shortcode of the first trigger into the version content field. Publish the trigger, and paste its shortcode on your website.

The result: If the user device is mobile, the shortcode of the trigger with the shortcode condition will be loaded. If the Schedule condition is met, the Click to call button will be displayed.

nested shortcodes multiple conditions

* The above strategy will do the trick. We’re aware it’s not an elegant solution– plans to add a simple built-in one is in the works.

If you have an If-So shortcode pasted inside another If-So trigger, and you set If-So to load triggers with Ajax, you need to make sure the nested shortcode is not loading with Ajax. In order to do so, simply add the parameter ajax=”no” to the nested shortcode.

Ready to get started?
Try it on your website