Support

Home Forums Event Espresso Premium accessing EE custom field data

accessing EE custom field data

Posted: February 19, 2019 at 1:13 pm


a608237

February 19, 2019 at 1:13 pm

I created an event and under “Custom Fields”, I selected “sp_timeline” and entered the value “2”. Where might I access sp_timeline associated with this event in mysql? It doesn’t seem to appear in wordpress.wp_posts. How might sp_timeline be displayed on the front end event page?


Josh

  • Support Staff

February 19, 2019 at 1:44 pm

Hi,

You’ll find code examples in the WordPress developer documentation for how to retrieve the custom field value:

https://developer.wordpress.org/reference/functions/get_post_meta/

If you’re familiar with WordPress action hooks, you can use any of the hooks found in the templates in the /public/ folder of EE4 core. For example, this hook:
do_action( 'AHEE_event_details_after_event_date', $post );
found in /public/Espresso_Arabica_2014/content-espresso_events-datetimes.php,
can be used to add content immediately following where the date(s) of the event is displayed.


a608237

February 19, 2019 at 1:48 pm

Suppose I’d like to tinker around with the event meta data in mysql, where might one locate sp_timeline for an event. thanks in advance.


a608237

February 19, 2019 at 1:56 pm

ultimately I’d just like to find it in the database so I can display a table like:

Event sp_timeline
2020 Olympics Summer


a608237

February 19, 2019 at 1:57 pm

Event | sp_timeline
————————-
2020 | Olympics Summer


Josh

  • Support Staff

February 19, 2019 at 2:03 pm

You would look in the wp_postmeta table

The support post ‘accessing EE custom field data’ 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