Home › Forums › General Issues › Custom Taxonomy Terms From Parent Term Selector › Reply To: Custom Taxonomy Terms From Parent Term Selector
Something like this would need to be done using custom JavaScript and AJAX. I’m currently working on a project that I’m doing this on. I won’t go into all of the details about the PHP side of things, that’s covered here well here https://codex.wordpress.org/AJAX_in_Plugins, but I can give an example of the type of JS you’ll need to to add. https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/ is the documentation on adding custom JS for ACF.
And some of what I’ve been working on can be found here https://github.com/Hube2/blunt-parametric-search/blob/master/admin/js/admin.js
If you look on line 363 at the function _para_tax_change, this function makes an AJAX request based on a select field that where the names of the taxonomies on the site are listed. The AJAX request returns a list of terms in the taxonomy and updates another select field with the choices.
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 use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.