Support

Account

Home Forums General Issues How to get field key from database? Reply To: How to get field key from database?

  • Hi,

    I have a very similar problem. I’m currently using:

    'post_content' => $_POST['fields']['field_53701c4623c64'],

    to pass the value of a custom field I called ‘content’.

    Is there any way to call the field key from the database using the field name? Or to set the field name as the input tag name in the DOM instead of the field key? As @funack mentioned using the field key requires hardcoding when using different environments.

    Also, in case this is not possible, if I include ACF within my WP Theme will any custom field keys I create be kept? (so other users can plug and play?) I don’t think it will be because it gets the values from the database or is this not the case?

    I would appreciate any help.

    Thanks
    Carlos