Home › Forums › Add-ons › Gallery Field › Extend Class acf_field_gallery render_field() function › Reply To: Extend Class acf_field_gallery render_field() function
I’m not sure that just copying the code from the gallery field will work. You’d need to work that code into the class the developer has provided for creating custom field types. A lot of the core fields do not work the same way that class functions.
If I were doing this I would use a repeater field for this rather than a gallery field. But then I’m not sure I completely understand what you’re doing. You might also be able to do this using a checkbox field where the labels for the fields are the images so that they can be selected.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The most recent ACF Chat Friday featured a live demo of how to register CPTs directly in the plugin, one of our most requested features. Check out the summary below for a replay of the demo, and don’t forget to register for the next session! https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 9, 2023
© 2023 Advanced Custom Fields.