The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Taxonomy Images
Remove links from images (4 posts)

  1. MichelleLeslie
    Posted 4 years ago #

    This plugin is awesome. I'm using it to show colours associated with a post.

    One thing I can't figure out is how to remove the links to the taxonomy archives from the taxonomy images (they're not required at this stage).

    The code I'm using to call the taxonomy images in my template is:

    <?php print apply_filters( 'taxonomy-images-list-the-terms', '', array(
    	'after'        => '</div>',
    	'after_image'  => '</span>',
    	'before'       => '<div class="swatches">',
    	'before_image' => '<span>',
    	'image_size'   => 'swatch',
    	'taxonomy'     => 'colours',
    ) ); ?>

    Can anyone help me with this?


  2. MichelleLeslie
    Posted 4 years ago #

    Did some more digging in the support archives. This thread solved it for me.

    Here's the code stevejonesdev's posted for those who need it.

    $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. MichelleLeslie
    Posted 4 years ago #

    Actually, not quite solved. This removed the links but made it so all my posts had the same taxonomy images (even though I specified different ones).

    If anyone knows another method, that would be much appreciated.

  4. Astony
    Posted 4 years ago #

    Has anyone found a solution for this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic