I’m using the plugin User Groups which lets me group users with categories. The plugin is working essentially the same as using the manual method (custom user taxonomies) described by Justin Tadlock here.
On author.php I want to list the taxonomies the currently viewed user belongs to, and each list item should link to the taxonomy term page.
I use the following code to get current user ID and retrieve custom field values from the profile page:
<?php // Get current author $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
And I use the following code to list the custom user taxonomies:
<?php // List custom user taxonomies wp_list_categories('taxonomy=user-group'); ?>
"taxonomy=user-group" is fetching all of the terms created within the plugin.
Here’s a way to get current post taxonomies, but I’m looking to change it to custom user taxonomies.
Is there a way for me to change wp_list_categories() to only display the taxonomies I want? Should I be looking for another approach?