Taxonomy values not outputting
-
I have three custom taxonomies registered and values attached to users in the backend.
I’m trying to output those values on user profile pages with no results. Here’s my code with a few debugging things in them
$taxonomies = get_object_taxonomies(get_the_ID(), 'objects'); echo count($taxonomies); $firm_terms = wp_get_object_terms( get_the_ID(), 'levelofexperience' ); if ( ! empty( $firm_terms ) ) { if ( ! is_wp_error( $firm_terms ) ) { foreach( $firm_terms as $term ) { echo $term->slug; } } }else{ echo "empty"; }
The count() gives 0 – empty array for taxonomies attached to the ID, and the check for empty on one specific tax returns empty. What am I missing here?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Taxonomy values not outputting’ is closed to new replies.