Support

Account

Home Forums Front-end Issues can't print taxonomy field name Reply To: can't print taxonomy field name

  • I can’t really read anything in the images you supplied before, so I can’t tell much by looking at them.

    Your problem may be that ACF is unable to return the term, now that I think about it this is more than likely the case. WP does not really support user terms and because of this ACF probably is not returning anything.

    See this discussion for more information about user taxonomies https://support.advancedcustomfields.com/forums/topic/user-taxonomies/

    You should probably return the term ID and not try to return the term Object and then get the term yourself

    
    $corso_id2 = get_field_object($corso_key, 'user_'.$current_user->ID);
    $term = get_term_by('id', $corso_id2, $taxonomy, 'OBJECT');
    

    see https://codex.wordpress.org/Function_Reference/get_term_by