WordPress.org

Forums

Taxonomy Images
Image doesn't show up (5 posts)

  1. My
    Member
    Posted 1 year ago #

    The assigned image to the category doesn't show up. :( No code at all shows up at the front end. I have tried these codes:

    <?php print apply_filters( 'taxonomy-images-queried-term-image', '', array(
        'after' => '</div>'
        'attr' => array(
            'alt'   => 'Custom alternative text',
            'class' => 'my-class-list bunnies turtles',
            'src'   => 'this-is-where-the-image-lives.png',
            'title' => 'Custom Title',
            ),
        'before' => '<div id="my-custom-div">',
        'image_size' => 'medium',
        ) );
    	?>

    and

    <?php print apply_filters( 'taxonomy-images-queried-term-image', '' ); ?>

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

  2. My
    Member
    Posted 1 year ago #

    It works, nevermind :)

  3. My
    Member
    Posted 1 year ago #

    Not working :S Why isn't the image there when I put this code?

    <?php print apply_filters( 'taxonomy-images-queried-term-image', '' ); ?>

  4. Maartje_1992
    Member
    Posted 1 year ago #

    I have the same problem,..

  5. Maartje_1992
    Member
    Posted 1 year ago #

    I think what you are looking for can be found in this topic.

    The solution I found there that worked for me is:

    <?php
    
    $terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy' => $thistax) );
    $terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=>'YOUR TAXONOMY SLUG HERE', 'image_size' => 'medium', 'term_args' => 'hide_empty=0', 'order' => 'ASC' , 'orderby' => 'title', 'count'   => 2) );
    
    echo '<ul class="ediciones clearfix">';
    foreach( (array) $terms as $term){
    		  echo '
    <li>';
    		  echo '<a>taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'thumb' ) . '<h4>'. sprintf(__('%s', 'my_localization_domain'), $term->name) . '</h4>' . '</a>';
    	  	  echo '</li>
    ';
    	}
    echo '';
    
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Taxonomy Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.