Add Custom Meta Data/Fields to the Store Locations
-
Hi there,
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:
https://wpstorelocator.co/document/add-custom-meta-data-to-store-locations/
https://wpstorelocator.co/document/wpsl_meta_box_fields/
https://wpstorelocator.co/document/wpsl_frontend_meta_fields/
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.
https://wpstorelocator.co/document/wpsl_frontend_meta_fields/But this filter is discussed in more detail in the documentation, and shows how to use it to add multiple fields
https://wpstorelocator.co/document/wpsl_meta_box_fields/—————-
The second part of my question.
The description of this filter says that these types of fields are supported: checkbox, textarea and dropdown
https://wpstorelocator.co/document/wpsl_meta_box_fields/But further in this filter only these types of fields are supported: email, url, text, textarea
https://wpstorelocator.co/document/wpsl_frontend_meta_fields/Then how can I add the “checkbox” field and then use it in the template to check to output this or that content?
Thanks!
- The topic ‘Add Custom Meta Data/Fields to the Store Locations’ is closed to new replies.