Hi,
I would like that my ACF taxonomy list looks like the defautl library https://select2.org/selections.
In my case, a hierarchy list, i need to have BOLD on first level and more indentation on 2nd level.
I don’t understand why ACF does not keep the SELECT2JS default presets that are much better visually.
ACF adds ‘ – ‘ for 2nd level and nogt BOLD on first.
Thanks for help.
Not sure I understand what you’re looking for help with. If you are suggesting that ACF changes this you can submit a support ticket here https://www.advancedcustomfields.com/contact/
If you want to alter the way the text is shown in the select field ACF has a filter to let you do that https://www.advancedcustomfields.com/resources/acf-fields-taxonomy-result/
Yes maybe ACF could change the look of taxonomy field.
But yes also, in my case, maybe can i use the filter you tell me, can i insert html tags into ?
I wish:
FIRSTLEVEL
<padding 20px> 2nd level
<padding 20px> 2nd level
<padding 20px> 2nd level
Honestly, I don’t know. I have never used this filter. But as I understand it Select2 is supposed to be able to handle html in select labels. You’d have to test it to find out.
what is strange is that when i use the filter as written in demo only to test, my list is empty (there are line items but no text…
function my_post_object_result( $title, $term, $field, $post_id ) {
// add the term's slug to each result
$title .= '(' . $term->slug . ')';
return $title;
}
add_filter('acf/fields/taxonomy/result', 'my_taxonomy_result', 10, 4);
Well, it’s doing something. But I haven’t got a clue why your getting no label listed at all.
very strange because same number of items (line items) but white with no text…