WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On the author template, I would like to display a list of the custom taxonomies associated to the posts written by that author.

In details: I have a "clubs" taxonomy, which is non-hierarchical and applies to Posts.

On the author template, I need to display a list of the "clubs" used by that author's Posts, as links. In this manner, i can list the clubs to which this author participates in.

Is that possible?

share|improve this question
Did you tried anything ? You can try first getting all of the post ids by author and then wp_get_object_terms functions to retrieve the terms by taxonomy and object_ids – Shazzad Feb 12 '14 at 0:42
up vote 1 down vote accepted

First grab the post ids by the author, and then the terms.

$author_id = '1234';
$taxonomy = 'clubs';

$post_ids = get_posts('fields=ids&post_type=post&post_status=publish&showposts=-1&author='. $author_id );
$clubs = wp_get_object_terms($post_ids, array($taxonomy));

$html = '<ul>';
foreach( $clubs as $club )
    $html .= sprintf( 
        '<li><a href="%1$s">%2$s</a></li>',
        get_term_link($club, $taxonomy),
$html .= '</ul>';

echo $html;
share|improve this answer
Hello Shazzad, Thank you it works quite nicely, except that if a tag has been used in 2 posts, it will appear twice. But you've sent me in the right direction, so i'll pick this up as the right answer. – pixeline Feb 12 '14 at 8:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.