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

  1. dizmarkie
    Posted 3 years 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">
    		$terms = apply_filters( 'taxonomy-images-get-terms', '',
    				'taxonomy' => 'entertainmenttype',
    				'term_args' => array(
    					'hide_empty' => 0
    		foreach( (array) $terms as $term) {?>
    			<a href="<?php echo home_url( '/entertainment-type/' ); echo $term->slug; ?>">
    				<?php echo wp_get_attachment_image( $term->image_id, 'entertainment-thumb' ); ?>
    			<a href="<?php echo home_url( '/entertainment-type/' ); echo $term->slug; ?>" class="button">
    				<?php echo $term->name; ?>
    		<?php } ?>

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

    thanksin advance!


Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic