Support

Account

Home Forums Backend Issues (wp-admin) Change Taxonomy Terms to Slugs in Admin Post Editor Reply To: Change Taxonomy Terms to Slugs in Admin Post Editor

  • Hi @aaronrobb

    Changing in core files is never a good thing since it’ll be overwritten each time you update (and ACF updates are pushed out quite regularly).

    The taxonomy query filter is really only if you want to change what to query, not how the results should look.

    If you’re open to switching to multiselect dropdown I think there’s a few filters you need to use.

    First is the http://www.advancedcustomfields.com/resources/acfload_field/
    Where you’ll want to modify the [‘choices’] array.

    And since it uses AJAX to fetch more taxonomies you need to modify the output there as well using this filter:
    acf/fields/taxonomy/result/name=name_of_field

    which takes these parameters $title, $term, $field, $post_id and should return $title.

    In there you can also check for the users role by doing

    
    $user = wp_get_current_user();
    if ( in_array( 'author', (array) $user->roles ) ) {
        //The user has the "author" role
    }