Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Having some trouble with taxonomy images plugin.

I am on single-post.php and I want to display my post's taxonomy terms & the term's associated images. Ideally, I'd like the taxonomy description there too. No idea why this has me stumped because it seems like it should be a simple thing to do.

I have this code, which displays just the post's term's images:

$terms = apply_filters( 'taxonomy-images-list-the-terms', '', array(
            'taxonomy' => 'comedians',
        ) );

        foreach( (array) $terms as $term){
            echo $term;

I also have this, which displays the post's terms:

        print get_the_term_list( $post->ID, 'comedians', '<li>', ',</li><li>', '</li>' );

And then I have this code, which displays all of the term's images, with the terms & links & descriptions:

$terms = apply_filters( 'taxonomy-images-get-terms', '', array(
            'taxonomy' => 'comedians',
        ) );
        if ( ! empty( $terms ) ) {
            print "\n" . '<div class="row">';
            foreach( (array) $terms as $term ) {
                print "\n" . '<div class="four columns">';
                print "\n\t" . '<a href="' . wp_get_attachment_url( $term->image_id ) . '" rel="lightbox unique-woo-feature">' . wp_get_attachment_image( $term->image_id, 'unique-woo-feature' ) . '</a>';
                print "\n\t" . '<h5>' . esc_html( $term->name ) . '</h5>';
                print "\n\t" . '<p>' . esc_html( $term->description ) . '</p>';
                print "\n" . '</div>';
            print "\n" . '</div>';

What I need is something in between. I understand the crucial part is the filter, specifically the difference between get-terms and list-the-terms but the latter one, which gets the post's terms like I need, doesn't seem to do anything but just the images no matter what I do.

Any help with this, much appreciated.

share|improve this question
add comment

Your Answer


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

Browse other questions tagged or ask your own question.