Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Custom Ticket Hiding Variables if empty | Event Espresso - Staging Server
Hi,
I am making a custom ticket template and what I want to do is hide certain variables if they are empty. for example I want to hide the “More Information:” Tag from the venue information if the field is empty. I have been trying to work this out. is it possible?
I have tried to use the standard PHP code in the “index.php” file if ($venue_description2 != "")echo"<p>More Information: </p>
<p>[venue_description]</p>"; ?>
I have added $venue_description2 = do_shortcode('[venue_description]'); at the beginning of the file.
This topic was modified 11 years ago by Guy Jackson.
The ticket shortcodes (and email shortcodes) are not regular WP shortcodes. We do a search and replace for them after the template is loaded. What I would do is change the template to look like this:
[venue_phone]</p>
[venue_description]</p>
and then in plugins/espresso-ticketing/functions.php, line 368, change it to be:
Thanks for your fast reply, It works perfectly. I have another related question. It probably sounds stupid but its probably because it is past midnight here. How would I implement this to do the same thing with the “Ticket Instructions:” or “Ticket Type:”
Thanks again.
That should do it, but Ticket Type will always be set (or should be!) so I think this change is moot.
Viewing 3 reply threads
The support post ‘Custom Ticket Hiding Variables if empty’ 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.