Home › Forums › Calendar Products › Events Calendar PRO › Custom field keys
- This topic has 5 replies, 2 voices, and was last updated 8 years, 7 months ago by
Jonathan Hawkes.
-
AuthorPosts
-
September 6, 2017 at 1:49 pm #1345658
Jonathan Hawkes
ParticipantI’m creating additional fields and filters. I can see the custom fields structure is saved in the options table, and then field keys are dynamically generated. as __ecp_custom_XX
Is there a way to create custom fields with a filter inside the theme?
Or would I need to edit the custom field keys manually?
September 8, 2017 at 4:21 am #1346520Andras
KeymasterHello Jonathan,
Thanks for using our plugins and for reaching out!
Do I understand correctly that you would like to create (or modify) a theme in a way, that it already has some custom fields built in including the filters that come with them?
Likely what you proposed, editing the custom field keys manually would be the way to go.
I will try to ask the team if anyone has another idea on this.
Cheers,
AndrasSeptember 8, 2017 at 12:44 pm #1346830Jonathan Hawkes
ParticipantI’ve created a few additional fields through the Calendar.
__ecp_custom_XX
The structure is stored in the wp options table, and the values are stored in the post meta table.
I’d just like more control over the name of the meta keys so rather than:
__ecp_custom_XX
I’d like to pick my own:
__custom_cost
___custom_age
And was wondering if the only way to do this was by editing the database directly. And if I do that, are there just the two places needed to change?
September 11, 2017 at 12:37 pm #1347660Andras
KeymasterHey Jonathan,
Yes, the only way of doing this is editing in the database directly.
Here are a couple of things to keep in mind:
- ensuring the new naming convention is used when the additional field settings are updated
- ensuring the new naming convention is used when additional fields are updated for individual events
- ensuring the fields that use this new convention can be read and understood by the rest of the plugin, such as when single event pages are rendered
I did some rough tests and it looks like that those are the only 2 places you need to change them.
The new names also seem stable when adding new custom fields or changing the labels on them.
That’s about it.
Andras
October 3, 2017 at 9:36 am #1358390Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Custom field keys’ is closed to new replies.
