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
Conditional statement for event meta | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Conditional statement for event meta

Conditional statement for event meta

Posted: October 30, 2013 at 6:31 pm

Viewing 2 reply threads


Angela Haddon

October 30, 2013 at 6:31 pm

Hi, I’m just trying to set up a simple conditional PHP statement for an event meta, so that it only displays when a meta value actually exists (ie. using the usual meta display shortcode). Perhaps I shouldn’t be working so late, but I’m just struggling to come up with a solution as the EE meta key/value pairs appear a little different to the normal WP ones. I’d appreciate any help with this, or at least a point in the right direction. Thanks :D


Dean

  • Support Staff

October 31, 2013 at 2:56 am

Hey,

Something like this

<?php
$mymeta = unserialize($event->event_meta);
//var_dump($mymeta);
if(isset($mymeta['name_of_meta_key_goes_here'])) {echo "This meta key is set";}
?>


Angela Haddon

November 2, 2013 at 3:23 pm

Great – thanks Dean, appreciate the help!

Viewing 2 reply threads

The support post ‘Conditional statement for event meta’ 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.

Event Espresso - Staging Server