Custom field keys

Home Forums Calendar Products Events Calendar PRO Custom field keys

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1345658
    Jonathan Hawkes
    Participant

    I’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?

    #1346520
    Andras
    Keymaster

    Hello 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,
    Andras

    #1346830
    Jonathan Hawkes
    Participant

    I’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?

    #1347660
    Andras
    Keymaster

    Hey 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

     

    #1358390
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Custom field keys’ is closed to new replies.