In short I’d like to achieve a select2 field with thumbnail in the list.
I want to have my users to be able to select a background pattern for the post. Since there’s going to be a lot of different patterns, I’d like to show the selection possibilities visually.
At the moment the pattern choices are media posts with taxonomy (“pattern”) which I filter in a “post object” field.
I’ve been looking at the different filters and actions, but I’m not getting any closer. I was looking at the select2 webpage and they showcase a list with a thumbnail attached so I’m assuming it can be done.
Looking forward to hear your thoughts on this.
Have a nice day
This isn’t something that you’re going to be able to do with ACF unless you build a new custom field type.
There is this one, I don’t know if it’s what you’re looking for, if not it would be a good starting point https://github.com/cyberwani/ACF-Image-Select
There may also be something else in this list https://github.com/navidkashani/awesome-acf
I already tried the Image Select extension,
but none of the extensions I’ve tried seem to not work together with the newest version of ACF.. :/
Yeah, that happens. If I had a use for an extension of if I do in the future I might build on, but more than likely I’d do something that achieves the same thing in a simpler way.
For example, a radio field with dynamically loaded choices where the label of the choice included an image tag. What’s outlined here can also be used for a radio button field http://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/. I don’t actually know what would happen if you inserted images into a select field.
Thanks again for getting back to me on this!
The project I’m working on where I need this has unfortunately been put a bit aside atm, but I’ll bookmark your link since it looks like what I’m looking for 🙂
You must be logged in to reply to this topic.
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!
We’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.