WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Can't get image URL to work (1 post)

  1. dizmarkie
    Member
    Posted 1 year ago #

    I'm able to render some term names and their images but i also want to return the imeg URL's.... I checked the documentation but couldn't figure it out.

    i have this in my archive-entertainment.php template (which i have a custom post type for).

    <div class="menus">
    	<ul>
    		<?php
    		$terms = apply_filters( 'taxonomy-images-get-terms', '',
    			array(
    				'taxonomy' => 'entertainmenttype',
    				'term_args' => array(
    					'hide_empty' => 0
    					)
    
    				));
    		foreach( (array) $terms as $term) {?>
    		<li>
    			<a href="<?php echo home_url( '/entertainment-type/' ); echo $term->slug; ?>">
    				<?php echo wp_get_attachment_image( $term->image_id, 'entertainment-thumb' ); ?>
    			</a>
    			<a href="<?php echo home_url( '/entertainment-type/' ); echo $term->slug; ?>" class="button">
    				<?php echo $term->name; ?>
    			</a>
    		</li>
    		<?php } ?>
    	</ul>
    </div>

    this works just fine... just need to also return the image url, any help on syntax from anyone?

    thanksin advance!

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic