Posted: July 18, 2022 at 7:45 pm
I am attempting to use Event Espresso 4 with Beaver Builder and Beaver Themer.
I’m trying to create a layout for the events using Beaver Themer, and that tool allows me to specifically target custom fields of the post and display them on the frontend, so all events can (hypothetically) share the same themer layout with an updated design.
I’ve tried to guess at what the custom field meta key would be for the datetimes and venue and other things like that, but in all of my testing I have not been able to find the custom field meta for the event fields.
Can you please let me know the custom field meta keys for the Event Espresso event fields, or show me where in the documentation that is?
Thanks so much!
We use a hybrid approach in that we do use custom post types but then all of the related data for that post is stored in custom tables rather than WP custom fields.
We then hook into the_content and inject the details into the post content on the fly, or it’s also possible to use template files to call specific functions to display the data (as it will pull in the data itself not using custom fields).
So the reason you can’t guess the custom field meta keys is there are none 🙂
Does Beaver Theme allow you to call custom functions rather than custom fields?
Good Evening Tony,
That makes a ton of sense, thank you for the information!
I’m not *sure* if I can directly call the functions rather than fields, but it’s certainly worth a shot.
Can you please send over an example of how you would call the function for a datetime. (Or just the starting datetime if we need to be super specific?)
I’ll take a crack at it and get the Beaver Builder support team involved.
Thanks so much!
Ok, so there’s a few ways of getting the EE data, depending on what you have already and from ‘where’ (which will make sense in a little).
The quickest example if can give you to answer your question is to take a look at the template examples within EE itself:
That’s calling a template tag
It depends on how much control you want ver the specific output what you need to do but looking over how that template tag works should give you more of an idea.
This bit is going to get a bit deeper, I don’t know if you are comfortable with PHP but here are some more advanced details.
When using Event Espresso the ‘best’ way to get access to any of the data you need is to understand our model system:
Once you understand the model system getting the data you need becomes relatively simple, how you get it changes depending on what you have already and what you need. To give you a quick example, you asked for details on how to get to a DateTime, but would you have something to specific call a DateTime already? Probably not.
A simple example of getting a DateTime when you have that Datetime’s ID (which you likely won’t on its own usually) is:
Datetimes are related to events (the post) so you’ll likely have the WP post or an
If you have the global post and it’s the post related to an EE event you can do:
Then always confirm you have what you expect before using it, so in this case $event should be an instance of EE event, lets check:
You want the datetimes for that event so you can do something like:
Now datetimes will be an array of
Now again you have access to the datetimes related to a specific event, each of those have multiple methods to output whatever you need for that DateTime… and even pull in related objects for that DateTime, like its related tickets.
As you start to work through the models you start to see how it makes it much easier to pull in related data from what you have/need than just starting from a post/ID and then using custom fields or functions to pull specific data.
The support post ‘Does Post Information Have Custom Fields’ 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.