Support » Plugin: Events Manager » How is there really no way to retrieve Event Attributes via PHP?
4 years, 2 months ago
I just attach my question 🙂 My wish is to get some Information (Location, Date, Start-Time) in the sidebar of the Event-Page.
So according to http://wordpress.org/support/topic/call-current-locationevent-id-in-shortcode you can – for example – get the current location ID by using $EM_Location->location_id. How would I get specific location information? maybe Adress? Domain? All the related information!
Same thing must be possible for events, too, or not?
As far as I can see the listet functions from http://wp-events-plugin.com/documentation/advanced-usage/ are only giving lists?
found this…. http://wordpress.org/support/topic/events-manager-eventslocation-pages-cant-get-sidebar
worked for me!
Well, I was able to figure out a very easy solution. I wonder why I couldn’t find this documented anywhere?
$event = eme_get_event($wp_query->query_vars['event_id']);
$event_attributes = $event['event_attributes']['Attribute Name'];
considering you’re using ’eme_get_event’ as a function, you’re probably not asking on the right forum… i’m guessing you want events made easy