Support » Plugin: Taxonomy Images » [Plugin: Taxonomy Images] Image URL for a specific category

  • vmodha

    (@vmodha)


    I’m trying to use the filter ‘taxonomy-images-queried-term-image-url’ to obtain the URL for a specific category, so not the current category. How can I do this?

    I’ve come up with a solution but I dont believe it’s the most effecient one.

    This works (category 3 is temporarily hard coded):

    $categories = apply_filters( 'taxonomy-images-get-terms', '', array(
    'term_args' => '&include=3orderby=count&hide_empty=0'
    ) );
    $category_image = wp_get_attachment_image_src( $categories[0]->image_id, 'small' );
    
    echo '<img src="' . $category_image[0] . '" alt="" />';

    http://wordpress.org/extend/plugins/taxonomy-images/

  • The topic ‘[Plugin: Taxonomy Images] Image URL for a specific category’ is closed to new replies.