Listing related Users on taxonomy-term.php
-
My users are now related to taxonomy “firm”.
I have now created a theme file for that, taxonomy-firm.php, listing term meta etc.
It should also display a list and details of the users related to the current term.How do I do this?
So far, I have…
<?php $users = get_objects_in_term( $term->term_id, 'firm' ); echo '<ol>'; foreach( $users as $user ) { echo '<li>User details</li>'; } echo '</ol>'; ?>
This successfully spits out the correct number of bullet lists corresponding to the user count related to this term.
But I don’t know how to access the users’ names, descriptions and custom meta fields from here. eg.
echo $user->display_name
doesn’t output anything. And then there are custom meta fields.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Listing related Users on taxonomy-term.php’ is closed to new replies.