WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
I just want a taxonomy list with thumbnails (6 posts)

  1. harrymfa
    Member
    Posted 1 year ago #

    I have a taxonomy list using this method:

    <? wp_tag_cloud( array(
    'taxonomy' => 'my_taxonomy',
    'format' => 'list'
    ) ); ?>

    All I want is that list displaying their thumbnails. The plugin page does not explain how to do this clearly and foolproof.

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

  2. MichelleLeslie
    Member
    Posted 1 year ago #

    Do you just want the taxonomy images without any links?

    If so, this code (from this thread) worked for me.

    $categories =  get_categories(array( 'taxonomy' => 'series' ));
     foreach ($categories as $category) {
     	$tax_term_id = $category->term_taxonomy_id;
     	$images = get_option('taxonomy_image_plugin');
     	echo wp_get_attachment_image( $images[$tax_term_id], 'medium' );
     }
  3. harrymfa
    Member
    Posted 1 year ago #

    Thank you. Ideally I would like the images with links, and the title of each. I will try to work something out with this code.

  4. MichelleLeslie
    Member
    Posted 1 year ago #

    If you want the links, try this.

    <?php print apply_filters( 'taxonomy-images-list-the-terms', '', array(
    	'after'        => '</div>',
    	'after_image'  => '</span>',
    	'before'       => '<div class="your-class">',
    	'before_image' => '<span>',
    	'image_size'   => 'thumbnail',
    	'taxonomy'     => 'taxonomy-name',
    ) ); ?>
  5. harrymfa
    Member
    Posted 1 year ago #

    Thanks again. I tried this code but it didn't return anything. I think I tried something similar to it earlier with the same result. The first code you provided me did return the images of each category but with not markup between them.

  6. tpecop
    Member
    Posted 1 year ago #

    <?php
    $terms = apply_filters( 'taxonomy-images-get-terms', null, array(
    'taxonomy' => 'model',
    ) );
    if ( ! empty( $terms ) ) {
    print ' ';
    foreach( (array) $terms as $term ) {
    print ' taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . '' ;
    } print ' ';
    }
    ?>
    </div>

    this actually will show only images. also this code is in tutorial

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic