get_the_terms not working
-
I’ve created custom user taxonomies, I’ve got users associated with them, I can see the associations in the database, they’re editable from the user profile page, they show up in the custom taxonomy count, they’re there…
When I try to get_the_terms… nada.
Here’s what I’ve got:
$users = new WP_User_Query( array( 'role' => 'Subscriber' ) ); foreach ( $users->results as $user ) : setup_postdata($user); $terms = get_the_terms($user->ID, 'MyTaxonomy'); if ($terms) foreach ($terms as $term) { echo $term->slug . ' '; } ////////// a bunch of other stuff ////////////////
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘get_the_terms not working’ is closed to new replies.