Home Forums Event Espresso Premium Email template conditional tags support

Email template conditional tags support

Posted: May 3, 2016 at 1:29 am


May 3, 2016 at 1:29 am


I’m trying to make custom templates for emails using the mailchimp template designer, exporting the template, paste inside the template editor and replace with shortcodes. Looks promising to avoid the Outlook email design problems and so, but the conditional tags are detected like invalid shortcodes.

An error has occurred:
The following shortcodes were found in the "[EVENT_LIST]" field that ARE not valid: [if gte mso 9],[endif],[if mso],[endif],[if mso],[endif],[if mso],[endif],[if mso],[endif],[if gte mso 9],[endif],[if gte mso 9],[endif],[if gte mso 9],[endif],[if gte mso 9],[endif]
Valid shortcodes for this field are:... 

The conditional tags I’m trying looks like this

                            <!--[if gte mso 9]>
                            <td align="center" valign="top" width="300" style="width:300px;">

Is there any way to escape those conditional tags or similar to try to apply those fixes for Outlook?


  • Support Staff

May 3, 2016 at 4:31 am

Hi there,

Currently you can not escape the shortcodes within the messages system so to allow for those shortcodes your going to need to ‘register’ them as valid shortcodes within the messages system, then return the shortcode itself when the shortcode is parsed.

So if you have [if gte mso 9] as a valid shortcode within various sections of the message you would just return ‘[if gte mso 9]’ when that shortcode is parsed.

Here is an example of how you can do that:

Note you will likely need to add additional ‘valid’ shortcodes to that list and depending on the sections you want to use those tags you will likely need additional checks within the instanceof conditionals for the shortcode types.

You can add the above function to your child themes functions.php file or a Site Specific Plugin. Be sure to check ALL of your message functionality continues to work as the above is not something we officially support.

The support post ‘Email template conditional tags support’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  Tony 4 years, 8 months ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!