Support

Account

Home Forums General Issues How is the list of taxonomy terms in a select box created? Reply To: How is the list of taxonomy terms in a select box created?

  • Figured this out thanks to this thread and other help online. Add a new filter:

    add_filter('acf/fields/taxonomy/wp_list_categories', 'md_format_citytax_terms_in_selectbox', 10, 2);

    then use that to replace the walker

    function md_format_citytax_terms_in_selectbox( $args, $field ) {
    
    	$args['walker'] = new md_taxonomy_field_walker( $field );
        return $args;
    }

    then dupe the walker code from core/fields/taxonomy and replace mdash; with three nbsp; and presto, problem solved.