WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Adding Taxonomy image to a single post (3 posts)

  1. rundes
    Member
    Posted 2 years ago #

    Hi! this is the code i´m using to call my terms on a single post

    <?php
    
    $terms_as_text = get_the_term_list( $post->ID, 'estado', '', ', ', '' ) ;
    echo strip_tags($terms_as_text);
    
    ?>

    how could i add image to this taxonomy list??? my idea is to use ir like a time line but i can´t get it to work!

    Thanks!

  2. Michael Fields
    Themer
    Plugin Author

    Posted 2 years ago #

    Have you tried the "taxonomy-images-list-the-terms" filter? Tis is probably your best bet. Something like this maybe:

    <?php
    print apply_filters( 'taxonomy-images-list-the-terms', '', array(
    	'after'        => '</ul>',
    	'after_image'  => '</li>',
    	'before'       => '<ul class="taxonomy-images-the-terms">',
    	'before_image' => '<li>',
    	'image_size'   => 'thumbnail',
    	'post_id'      => 0,
    	'taxonomy'     => 'category',
    ) );
    ?>
  3. whatadewitt
    Member
    Posted 2 years ago #

    anyway to do this without creating the links?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic