Skip to content

Instantly share code, notes, and snippets.

@ChrisWebbNZ
ChrisWebbNZ / hierearchical-select-acf.php
Last active May 5, 2022 17:56
Hierarchical select for native Advanced Custom Fields taxonomy fields
/*
Got a hierarchical taxonomy in Wordpress? Want to make users select a top-level term first,
then one of its children, then maybe one of its children? Me too!
1. Create a native ACF taxonomy field, with multiple values allowed.
2. Add the following JS and PHP snippets to your theme / plugin - replace all instances of the field key with your own.
*/