I need to add several custom meta data/fields to a separate tab on the Location editing page. Then use the values of these fields in all templates.
I used these instructions:
This works great when I add only one custom text field. I see it on the edit page, and I see the output of the field value on the live site page.
But as soon as I try to add more than one custom field, everything breaks and the templates don’t work.
I get an error in the browser console: “Uncaught ReferenceError: new_custom_field is not defined”
Please explain how to correctly use this filter to add SEVERAL custom fields (include additional meta data in the JSON). In the documentation, this filter is always used and shows only how to add/include ONE custom field.
But this filter is discussed in more detail in the documentation, and shows how to use it to add multiple fields
The second part of my question.
The description of this filter says that these types of fields are supported: checkbox, textarea and dropdown
But further in this filter only these types of fields are supported: email, url, text, textarea
Then how can I add the “checkbox” field and then use it in the template to check to output this or that content?
- You must be logged in to reply to this topic.