Hello,
I am using ACF Taxonomy and Select 2 in my theme to retrieve a list of taxonomies and I want to display them the way the taxonomies appear in the backend of ACF (http://imgur.com/nfJYj0o), they are ordered and with subitems and I need to do exactly the same.
Any clue how to do it with select2 please? (I think that’s the plugin used by ACF).
Hi @kevin-mamaqi
Could you please explain what did you mean by “how to do it with select2?” If you want to show a taxonomy input field like the one on the backend, I believe you can use the acf_form() function. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/create-a-front-end-form/.
I hope this helps 🙂
I mean the order and style. The backend dropdown has subcategories differenciated. And O’ve seen that acf uses select2 for the dropdown, that’s what I want to have.
Hi @kevin-mamaqi
You can check how ACF does it by looking into the get_choices()
function in “wp-content/plugins/advanced-custom-fields-pro/fields/taxonomy.php”.
Hope this helps 🙂