Embedding an If-So trigger directly in your website files might be necessary in some cases, depending on how your site is built.
In other cases, you might want to redirect visitors to another page based on one of the If-So conditions. Embedding a trigger directly in the page template will provide a better user experience since the redirection will take place before the content of the page starts to load.
To embed an If-So trigger in the page template, simply, click “PHP code (for developers)” right below the trigger shortcode on the trigger editing page. Copy the code, and paste it into your template.
Alternatively, you can use the “echo do_shortcode(‘…’);” function below, but make sure to replace the “XXX” with the ID of your trigger:
<?php echo_shortcode('[ifso id="XXX" ajax="yes"]'); ?>
If you want to enable Ajax loading for a specific trigger that is embedded directly in the page template using a PHP code, you can use the “echo do_shortcode(‘…’);” function